diff options
author | nectar <nectar@FreeBSD.org> | 2004-01-13 21:28:43 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2004-01-13 21:28:43 +0000 |
commit | 5764f4d7afe9c461b9992adbdc60227503cd1051 (patch) | |
tree | 50e31fc14363d599d4b3790fb5077981b0156d84 /net/gaim | |
parent | 120a064077050eaea7f2d0ad2b329566b0428480 (diff) | |
download | FreeBSD-ports-5764f4d7afe9c461b9992adbdc60227503cd1051.zip FreeBSD-ports-5764f4d7afe9c461b9992adbdc60227503cd1051.tar.gz |
Fix a regression in the upgrade to gaim 0.75: sscanf() was called with
an unterminated buffer, resulting in a segfault depending upon the
environment e.g. locale settings. If you are getting crashes when
attempting to sign onto Yahoo! messenger, this may be the issue.
This is being tracked at gaim.sf.net as request ID 876365.
Approved by: marcus (maintainer)
Diffstat (limited to 'net/gaim')
-rw-r--r-- | net/gaim/Makefile | 1 | ||||
-rw-r--r-- | net/gaim/files/patch-src::util.c | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/net/gaim/Makefile b/net/gaim/Makefile index 9290f1b..59f6bd6d 100644 --- a/net/gaim/Makefile +++ b/net/gaim/Makefile @@ -6,6 +6,7 @@ PORTNAME= gaim PORTVERSION= 0.75 +PORTREVISION= 1 CATEGORIES?= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/net/gaim/files/patch-src::util.c b/net/gaim/files/patch-src::util.c new file mode 100644 index 0000000..67054a7 --- /dev/null +++ b/net/gaim/files/patch-src::util.c @@ -0,0 +1,28 @@ +*** src/util.c.orig Tue Jan 13 14:49:00 2004 +--- src/util.c Tue Jan 13 14:49:11 2004 +*************** +*** 2081,2089 **** + static size_t + parse_content_len(const char *data, size_t data_len) + { +! size_t content_len = 0; + +! sscanf(data, "Content-Length: %d", (int *)&content_len); + + return content_len; + } +--- 2081,2094 ---- + static size_t + parse_content_len(const char *data, size_t data_len) + { +! int content_len = 0; +! char *tmp; + +! tmp = g_malloc(data_len + 1); +! memcpy(tmp, data, data_len); +! tmp[data_len] = '\0'; +! sscanf(tmp, "Content-Length: %d", &content_len); +! g_free(tmp); + + return content_len; + } |