ipcs: do not use atoi()

Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2021-06-22 15:19:22 +02:00
parent a1b3e2ec9d
commit 70bce9b32f
1 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@
#include "nls.h"
#include "closestream.h"
#include "timeutils.h"
#include "strutils.h"
#include "ipcutils.h"
@ -120,7 +121,7 @@ int main (int argc, char **argv)
while ((opt = getopt_long(argc, argv, options, longopts, NULL)) != -1) {
switch (opt) {
case 'i':
id = atoi (optarg);
id = strtos32_or_err(optarg, _("failed to parse id argument"));
specific = 1;
break;
case 'a':