freebsd-ports/net-im/climm/files/patch-ae
Maxim Sobolev 58c6948e7c o Correct Ukrainian translation;
o add translations of user's nick from cp1251 into koi8 if needed in message.

Submitted by:	Olexander Kunytsa <kunia@wolf.istc.kiev.ua>
2001-03-28 12:30:39 +00:00

33 lines
1.0 KiB
Plaintext

--- icq_response.c.orig Tue Jan 23 16:49:05 2001
+++ icq_response.c Sun Mar 25 23:54:20 2001
@@ -740,6 +740,7 @@
return;
}
*tmp = 0;
+ char_conv ("wc",data); //By Kunia User's nick was not transcoded...;(
M_print( CONTACTCOL "\n%s" NOCOL " has added you to their contact list.\n", data );
tmp++;
data = tmp;
@@ -871,19 +872,12 @@
}
*tmp = 0;
char_conv ("wc",data);
-// temporaryy fix to buffer overflow
-// should be solved better -mc
-// strcpy (url_desc,data);
- url_desc[0] = '\0';
- strncat(url_desc,data,sizeof(url_data)-1);
+ strlcpy(url_desc,data,sizeof(url_data));
tmp++;
data = tmp;
char_conv ("wc",data);
-// same apllies here --mc
-// strcpy (url_data,data);
- url_data[0] = '\0';
- strncat (url_data,data,sizeof(url_data)-1);
+ strlcpy(url_data,data,sizeof(url_data));
// and again
// sprintf (message,"Description: %s \n URL: %s",url_desc,url_data);