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 */
|
/* copy to output buffer */
|
||||||
*tempptr = '\0';
|
if (tempptr != temp) {
|
||||||
if (temp[0]) {
|
size_t temp_len = (size_t) (tempptr - temp);
|
||||||
int temp_len = (tempptr - temp) + 1;
|
|
||||||
|
|
||||||
if (temp_len <= buf_len)
|
if (temp_len < (size_t) buf_len) {
|
||||||
g_strlcpy(buf, temp, buf_len); /* memcpy(), strcpy() ? */
|
memcpy(buf, temp, temp_len);
|
||||||
else
|
buf[temp_len] = '\0';
|
||||||
|
} else
|
||||||
g_strlcpy(buf, BUF_TOO_SMALL_ERR, buf_len);/* Let the unexpected value alert user */
|
g_strlcpy(buf, BUF_TOO_SMALL_ERR, buf_len);/* Let the unexpected value alert user */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue