From Jakub Zawadzki:
Fix win64 build. svn path=/trunk/; revision=31204
This commit is contained in:
parent
7885ac7b92
commit
d71b1088f7
|
@ -1108,13 +1108,13 @@ address_to_str_buf(const address *addr, gchar *buf, int buf_len)
|
|||
}
|
||||
|
||||
/* copy to output buffer */
|
||||
*tempptr = '\0';
|
||||
if (temp[0]) {
|
||||
int temp_len = (tempptr - temp) + 1;
|
||||
if (tempptr != temp) {
|
||||
size_t temp_len = (size_t) (tempptr - temp);
|
||||
|
||||
if (temp_len <= buf_len)
|
||||
g_strlcpy(buf, temp, buf_len); /* memcpy(), strcpy() ? */
|
||||
else
|
||||
if (temp_len < (size_t) buf_len) {
|
||||
memcpy(buf, temp, temp_len);
|
||||
buf[temp_len] = '\0';
|
||||
} else
|
||||
g_strlcpy(buf, BUF_TOO_SMALL_ERR, buf_len);/* Let the unexpected value alert user */
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue