aboutsummaryrefslogtreecommitdiffstats
path: root/rawshark.c
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2008-10-13 06:54:19 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2008-10-13 06:54:19 +0000
commit7f36dc44ce5efad3f2ca7746ac3297bd7e3b5117 (patch)
treeafdcc5ec556b6ed8ce76e50bed261ce92346b3a5 /rawshark.c
parent3893c32000a7894cf3038d820052c1c816cfd87c (diff)
Fix for bug 2823:
Do not pass automatic variable back into caller space. svn path=/trunk/; revision=26425
Diffstat (limited to 'rawshark.c')
-rw-r--r--rawshark.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rawshark.c b/rawshark.c
index 8f786e8f29..7c388ba370 100644
--- a/rawshark.c
+++ b/rawshark.c
@@ -884,7 +884,7 @@ raw_pipe_read(struct wtap_pkthdr *phdr, guchar * pd, int *err, gchar **err_info,
struct pcap_pkthdr hdr;
int bytes_read = 0;
int bytes_needed = sizeof(struct pcap_pkthdr);
- gchar err_str[1024+1];
+ static gchar err_str[100];
/* Copied from capture_loop.c */
while (bytes_needed > 0) {
@@ -916,7 +916,7 @@ raw_pipe_read(struct wtap_pkthdr *phdr, guchar * pd, int *err, gchar **err_info,
#endif
if (bytes_needed > WTAP_MAX_PACKET_SIZE) {
*err = WTAP_ERR_BAD_RECORD;
- g_snprintf(err_str, 1024, "Bad packet length: %d (%04x)", bytes_needed, bytes_needed);
+ g_snprintf(err_str, 100, "Bad packet length: %d (%04x)", bytes_needed, bytes_needed);
*err_info = err_str;
return FALSE;
}