Wireshark mailing list archives
Re: [PATCH] fix a Buffer overrun possible for long command line arguments.
From: Alexis La Goutte <alexis.lagoutte () gmail com>
Date: Mon, 4 Aug 2014 08:35:38 +0200
On Sun, Aug 3, 2014 at 8:20 PM, Toralf Förster <toralf.foerster () gmx de> wrote:
cpotted by cppcheck
Signed-off-by: Toralf Förster <toralf.foerster () gmx de>
---
epan/dissectors/dcerpc/idl2wrs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/epan/dissectors/dcerpc/idl2wrs.c b/epan/dissectors/dcerpc/idl2wrs.c
index 8c4f73b..89c1eb0 100644
--- a/epan/dissectors/dcerpc/idl2wrs.c
+++ b/epan/dissectors/dcerpc/idl2wrs.c
@@ -3184,7 +3184,7 @@ int main(int argc, char *argv[])
eth_ft=fopen("ETH_FT", "w");
eth_handoff=fopen("ETH_HANDOFF", "w");
- sprintf(idlfile, "%s.cnf", argv[1]);
+ snprintf(idlfile, "%s.cnf", sizeof(idlfile)-4, argv[1]);
fh=fopen(idlfile,"r");
if(fh){
readcnffile(fh);
--
2.0.4
Hi Toratlf, Please, push your patch directly on Wireshark Gerrit : http://code.wireshark.org/review
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- [PATCH] fix a Buffer overrun possible for long command line arguments. Toralf Förster (Aug 03)
- Re: [PATCH] fix a Buffer overrun possible for long command line arguments. Alexis La Goutte (Aug 03)
