vms: use ws_strtoi function.
Change-Id: I30c32a6fc4200da5a150769b84f91b4d193f8f5d Reviewed-on: https://code.wireshark.org/review/17536 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
a4c95ebe03
commit
4c39e19ff3
|
@ -30,6 +30,8 @@
|
|||
#include "vms.h"
|
||||
#include "file_wrappers.h"
|
||||
|
||||
#include <wsutil/strtoi.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -386,7 +388,11 @@ parse_vms_packet(FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf, int *err, gch
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
pkt_len = atoi(p);
|
||||
if (!ws_strtoi32(p, &pkt_len)) {
|
||||
*err = WTAP_ERR_BAD_FILE;
|
||||
*err_info = g_strdup_printf("vms: packet length: %s", p);
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} while (! isdumpline(line));
|
||||
|
|
Loading…
Reference in New Issue