From d7fdd9fdf349a79c959c7b2547634d0ca74a85b7 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Jan 06 2021 22:39:29 +0000 Subject: Apply patch glibc-rh1817513-56.patch patch_name: glibc-rh1817513-56.patch present_in_specfile: true location_in_specfile: 457 --- diff --git a/support/test-container.c b/support/test-container.c index 9fcc91e..d7ed073 100644 --- a/support/test-container.c +++ b/support/test-container.c @@ -940,7 +940,9 @@ main (int argc, char **argv) else if (nt == 3 && strcmp (the_words[0], "chmod") == 0) { long int m; + errno = 0; m = strtol (the_words[1], NULL, 0); + TEST_COMPARE (errno, 0); if (chmod (the_words[2], m) < 0) FAIL_EXIT1 ("chmod %s: %s\n", the_words[2], strerror (errno)); diff --git a/support/tst-support_capture_subprocess.c b/support/tst-support_capture_subprocess.c index 9957087..fe6649d 100644 --- a/support/tst-support_capture_subprocess.c +++ b/support/tst-support_capture_subprocess.c @@ -133,7 +133,9 @@ static int parse_int (const char *str) { char *endptr; - long int ret = strtol (str, &endptr, 10); + long int ret; + errno = 0; + ret = strtol (str, &endptr, 10); TEST_COMPARE (errno, 0); TEST_VERIFY (ret >= 0 && ret <= INT_MAX); return ret;