summaryrefslogtreecommitdiff
path: root/net/gaim
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2004-01-13 21:28:43 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2004-01-13 21:28:43 +0000
commit56256f55649da7aca8ae799f5bc764f2c02333aa (patch)
tree3d2d9643cc68d23f4aa800b88a4a13c814d8adc9 /net/gaim
parent- Update to version 0.5.3 (diff)
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)
Notes
Notes: svn path=/head/; revision=98113
Diffstat (limited to 'net/gaim')
-rw-r--r--net/gaim/Makefile1
-rw-r--r--net/gaim/files/patch-src::util.c28
2 files changed, 29 insertions, 0 deletions
diff --git a/net/gaim/Makefile b/net/gaim/Makefile
index 9290f1ba5e05..59f6bd6d3c15 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 000000000000..67054a740409
--- /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;
+ }