diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-02-16 02:16:12 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-02-16 02:16:12 +0000 |
commit | 59f65ab8153aaa6d8e135249e4730fe04388a089 (patch) | |
tree | ff861e38437c52f45c8a6e849fba12aecdf3f55b /wiretap/pppdump.c | |
parent | b2d28ce4352dd9711580af92b4dab2f7dd93656b (diff) | |
download | wireshark-59f65ab8153aaa6d8e135249e4730fe04388a089.tar.gz |
Check the index before storing into the array.
svn path=/trunk/; revision=35956
Diffstat (limited to 'wiretap/pppdump.c')
-rw-r--r-- | wiretap/pppdump.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wiretap/pppdump.c b/wiretap/pppdump.c index a0e8d303e2..3a42c10915 100644 --- a/wiretap/pppdump.c +++ b/wiretap/pppdump.c @@ -513,11 +513,11 @@ process_data(pppdump_t *state, FILE_T fh, pkt_t *pkt, int n, guint8 *pd, pkt->esc = FALSE; } - pkt->buf[pkt->cnt++] = c; if (pkt->cnt >= PPPD_BUF_SIZE) { *err = WTAP_ERR_UNC_OVERFLOW; return -1; } + pkt->buf[pkt->cnt++] = c; break; } } |