On Sat, Jun 15, 2002 at 01:11:24PM -0300, "Juan F. Codagnone" 
<[EMAIL PROTECTED]> wrote:
> On Saturday 15 June 2002 12:50, Tim van Erven wrote:
>> diff -u -ru -X dontdiff licq-p2/src/icqd-chat.cpp licq/src/icqd-chat.cpp
>> --- licq-p2/src/icqd-chat.cpp Thu Jun 13 01:56:31 2002
>> +++ licq/src/icqd-chat.cpp    Sat Jun 15 17:34:49 2002
>> @@ -550,7 +550,7 @@
>>    if (fontBold) m_nFontFace |= FONT_BOLD;
>>    if (fontItalic) m_nFontFace |= FONT_ITALIC;
>>    if (fontUnderline) m_nFontFace |= FONT_UNDERLINE;
>> -  strncpy(m_szFontFamily, fontFamily, 64);
>> +  strncpy(m_szFontFamily, fontFamily, sizeof(m_szFontFamily));
>>    m_nFontSize = fontSize;
>>    m_nColorFore[0] = fr;
>>    m_nColorFore[1] = fg;
>> @@ -1847,7 +1847,7 @@
>>    // 0x22ba baltic
>>    SendBuffer(&buf, CHAT_FONTxFAMILY);
>> 
>> -  strncpy(m_szFontFamily, f, 64);
>> +  strncpy(m_szFontFamily, f, sizeof(m_szFontFamily));
>>  }
> 
> m_szFontFamily is a pointer not an array. sizeof is only 4, but i guess 
> that the literal 64 should be removed toward something less magic.

No, in class CChatManager it's actually declared as:

char m_szFontFamily[64];

(Which is rather confusing, I admit.)

-- 
Tim van Erven <[EMAIL PROTECTED]>
OpenPGP Key ID: 712CB811        Fingerprint: F6C9 61EE 242C C012 36D5
                                             BBF8 6310 D557 712C B811

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

_______________________________________________
Licq-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/licq-devel

Reply via email to