1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

Fix crash in IP address formatting code for buddy tooltip.

Reported by: Aleksey Sosnin <sam@macomnet.ru>
This commit is contained in:
Alexander Nedotsukov 2003-10-02 07:21:32 +00:00
parent c3d050563b
commit d4bb4bce45
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=90023
4 changed files with 40 additions and 0 deletions

View File

@ -6,6 +6,7 @@
PORTNAME= gaim
PORTVERSION= 0.70
PORTREVISION= 1
CATEGORIES?= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

View File

@ -0,0 +1,19 @@
--- src/protocols/oscar/oscar.c.orig Thu Oct 2 15:40:55 2003
+++ src/protocols/oscar/oscar.c Thu Oct 2 15:59:38 2003
@@ -5462,11 +5462,11 @@
free(tstr);
if (bi->ipaddr) {
- char *tstr = g_strdup_printf("%hhd.%hhd.%hhd.%hhd",
- (bi->ipaddr & 0xff000000) >> 24,
- (bi->ipaddr & 0x00ff0000) >> 16,
- (bi->ipaddr & 0x0000ff00) >> 8,
- (bi->ipaddr & 0x000000ff));
+ char *tstr = g_strdup_printf("%hhu.%hhu.%hhu.%hhu",
+ (char)(bi->ipaddr >> 24),
+ (char)(bi->ipaddr >> 16),
+ (char)(bi->ipaddr >> 8),
+ (char)bi->ipaddr);
tmp = yay;
yay = g_strconcat(tmp, _("<b>IP Address:</b> "), tstr, "\n", NULL);
free(tmp);

View File

@ -6,6 +6,7 @@
PORTNAME= gaim
PORTVERSION= 0.70
PORTREVISION= 1
CATEGORIES?= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

View File

@ -0,0 +1,19 @@
--- src/protocols/oscar/oscar.c.orig Thu Oct 2 15:40:55 2003
+++ src/protocols/oscar/oscar.c Thu Oct 2 15:59:38 2003
@@ -5462,11 +5462,11 @@
free(tstr);
if (bi->ipaddr) {
- char *tstr = g_strdup_printf("%hhd.%hhd.%hhd.%hhd",
- (bi->ipaddr & 0xff000000) >> 24,
- (bi->ipaddr & 0x00ff0000) >> 16,
- (bi->ipaddr & 0x0000ff00) >> 8,
- (bi->ipaddr & 0x000000ff));
+ char *tstr = g_strdup_printf("%hhu.%hhu.%hhu.%hhu",
+ (char)(bi->ipaddr >> 24),
+ (char)(bi->ipaddr >> 16),
+ (char)(bi->ipaddr >> 8),
+ (char)bi->ipaddr);
tmp = yay;
yay = g_strconcat(tmp, _("<b>IP Address:</b> "), tstr, "\n", NULL);
free(tmp);