openbsd-ports/net/pchar/patches/patch-PctestIpv4File_cc
avsm c2ac238c02 - update to new HOMEPAGE/MASTER_SITES
- plug off-by-ones in ip address handling
- bump PKGNAME
patches submitted to author
2003-06-17 15:28:55 +00:00

29 lines
853 B
Plaintext

$OpenBSD: patch-PctestIpv4File_cc,v 1.1 2003/06/17 15:28:55 avsm Exp $
--- PctestIpv4File.cc.orig Tue Jun 17 16:20:42 2003
+++ PctestIpv4File.cc Tue Jun 17 16:21:11 2003
@@ -195,13 +195,13 @@ int PctestIpv4File::SetTargetName(char *
else if (strncasecmp(s, "src ", 4) == 0) {
char t[128];
- sscanf(s, "src %128s", t);
+ sscanf(s, "src %127s", t);
originAddress.s_addr = inet_addr(t);
}
else if (strncasecmp(s, "dest ", 5) == 0) {
char t[128];
- sscanf(s, "dest %128s", t);
+ sscanf(s, "dest %127s", t);
targetAddress.s_addr = inet_addr(t);
}
@@ -236,7 +236,7 @@ int PctestIpv4File::SetTargetName(char *
else if (strncasecmp(s, "targethost ", 11) == 0) {
char t[128];
- sscanf(s, "targethost %128s", t);
+ sscanf(s, "targethost %127s", t);
PctestIpv4::SetTargetName(t);
}