]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(parse_field_count): Handle the case where overflow
authorJim Meyering <jim@meyering.net>
Wed, 15 Oct 2003 07:24:39 +0000 (07:24 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 15 Oct 2003 07:24:39 +0000 (07:24 +0000)
and invalid suffix char are both reported.

src/sort.c

index 5fc6640bb4f802f7629409a24503248120843ab7..5945c867ab62a1e7c86df50c49dda6bc430e0bdc 100644 (file)
@@ -2112,6 +2112,7 @@ parse_field_count (char const *string, size_t *val, char const *msgid)
        break;
       /* Fall through.  */
     case LONGINT_OVERFLOW:
+    case LONGINT_OVERFLOW | LONGINT_INVALID_SUFFIX_CHAR:
       if (msgid)
        error (SORT_FAILURE, 0, _("%s: count `%.*s' too large"),
               _(msgid), (int) (suffix - string), string);