gwlib/http.c patch
"Nikos Balkanas" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <002b01c9af01$c06655d0$02b2a8c0@tardis> |
Hi, A small patch that left as it is should lead to memory corruption. I have not tested the broken code but it seems quite obvious to me. Please vote & decide. BR, Nikos
http.diff
(application/octet-stream, 581 B)
Index: gwlib/http.c
===================================================================
RCS file: /home/cvs/gateway/gwlib/http.c,v
retrieving revision 1.255
diff -a -u -r1.255 http.c
--- gwlib/http.c 26 Jan 2009 15:20:17 -0000 1.255
+++ gwlib/http.c 27 Mar 2009 17:24:09 -0000
@@ -2816,7 +2816,7 @@
*value = octstr_duplicate(os);
} else {
*name = octstr_copy(os, 0, colon);
- *value = octstr_copy(os, colon + 1, octstr_len(os));
+ *value = octstr_copy(os, colon + 1, octstr_len(os) - colon - 1);
octstr_strip_blanks(*value);
}
}