summaryrefslogtreecommitdiff
path: root/tethereal.c
diff options
context:
space:
mode:
authorLaurent Deniel <laurent.deniel@free.fr>2000-08-19 18:20:59 +0000
committerLaurent Deniel <laurent.deniel@free.fr>2000-08-19 18:20:59 +0000
commit8bc95e98e407bbe1f9584c7142814497325eafcc (patch)
tree4ca56c89fd833e34b9657c5f69cbfd5a2928a355 /tethereal.c
parent69dce2464bb89fbcd37230d4aad8c64078dcd2d6 (diff)
downloadwireshark-8bc95e98e407bbe1f9584c7142814497325eafcc.tar.gz
Fix potential buffer overflows.
svn path=/trunk/; revision=2298
Diffstat (limited to 'tethereal.c')
-rw-r--r--tethereal.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tethereal.c b/tethereal.c
index 4db007b314..75543b3109 100644
--- a/tethereal.c
+++ b/tethereal.c
@@ -1,6 +1,6 @@
/* tethereal.c
*
- * $Id: tethereal.c,v 1.41 2000/08/14 08:36:41 guy Exp $
+ * $Id: tethereal.c,v 1.42 2000/08/19 18:20:59 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -1038,8 +1038,9 @@ file_open_error_message(int err, gboolean for_writing)
break;
default:
- sprintf(errmsg_errno, "The file \"%%s\" could not be opened: %s.",
- wtap_strerror(err));
+ snprintf(errmsg_errno, sizeof(errmsg_errno),
+ "The file \"%%s\" could not be opened: %s.",
+ wtap_strerror(err));
errmsg = errmsg_errno;
break;
}