From c5cb76042a816d51c017d6b709d1c2485a47ff6b Mon Sep 17 00:00:00 2001 From: Michael Fulbright Date: Sat, 7 Nov 1998 21:29:05 +0000 Subject: Changed a sprintf to a snprintf in vcc.y Should vcc.c be under CVS control? I thought it was a derived file. This fixes gnomecard segfaulting when it tried to load a non-existant file on startup. Dr Mike svn path=/trunk/; revision=466 --- libversit/vcc.c | 4 ++-- libversit/vcc.y | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'libversit') diff --git a/libversit/vcc.c b/libversit/vcc.c index 02ab47cb8e..c26f28a0c5 100644 --- a/libversit/vcc.c +++ b/libversit/vcc.c @@ -2030,8 +2030,8 @@ DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname) return o; } else { - char msg[80]; - sprintf(msg, "can't open file '%s' for reading\n", fname); + char msg[256]; + snprintf(msg, sizeof(msg), "can't open file '%s' for reading\n", fname); mime_error_(msg); return 0; } diff --git a/libversit/vcc.y b/libversit/vcc.y index b8b9933f2c..5c9a751913 100644 --- a/libversit/vcc.y +++ b/libversit/vcc.y @@ -1176,8 +1176,8 @@ DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname) return o; } else { - char msg[80]; - sprintf(msg, "can't open file '%s' for reading\n", fname); + char msg[256]; + snprintf(msg, sizeof(msg), "can't open file '%s' for reading\n", fname); mime_error_(msg); return 0; } -- cgit