freebsd-ports/mail/anubis/files/patch-src_tunnel.c
Christian Weisgerber c16e051e69 Buffer overflow and format string fixes.
(Also don't put several patches in a single file.)

Approved by:	sergei
Obtained from:	upstream
Reported by:	Ulf Harnhammar <Ulf.Harnhammar.9485@student.uu.se>
2004-03-07 20:49:32 +00:00

20 lines
536 B
C

$FreeBSD$
--- src/tunnel.c.orig Sun Dec 8 19:04:51 2002
+++ src/tunnel.c Sun Mar 7 14:55:10 2004
@@ -554,9 +554,11 @@
ptr1 = strstr(boundary_buf, "boundary=");
if (ptr1 == 0) {
plist = plist->next;
- safe_strcpy(boundary_buf, plist->line);
- change_to_lower(boundary_buf);
- ptr1 = strstr(boundary_buf, "boundary=");
+ if (plist) {
+ safe_strcpy(boundary_buf, plist->line);
+ change_to_lower(boundary_buf);
+ ptr1 = strstr(boundary_buf, "boundary=");
+ }
}
if (ptr1) {