From b921d166fefa8113379efa410010bfdaa9cf5166 Mon Sep 17 00:00:00 2001 From: waltje Date: Sat, 16 Sep 2023 15:59:27 -0400 Subject: [PATCH] Updated pseudo.c to issue error on negative count in FILL. --- src/pseudo.c | 4 +++- src/version.h | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pseudo.c b/src/pseudo.c index ffe97e7..ca30af2 100644 --- a/src/pseudo.c +++ b/src/pseudo.c @@ -8,7 +8,7 @@ * * Handle directives and pseudo-ops. * - * Version: @(#)pseudo.c 1.0.10 2023/06/24 + * Version: @(#)pseudo.c 1.0.11 2023/09/16 * * Authors: Fred N. van Kempen, * Bernd B”ckmann, @@ -655,6 +655,8 @@ do_fill(char **p, int pass) if ((pass == 2) && UNDEFINED(v)) error(ERR_UNDEF, NULL); count = v.v; + if (count < 0) + error(ERR_RNG, NULL); skip_white(p); if (**p == ',') { diff --git a/src/version.h b/src/version.h index 726ca18..f744fc6 100644 --- a/src/version.h +++ b/src/version.h @@ -8,7 +8,7 @@ * * Define application version and build info. * - * Version: @(#)version.h 1.0.11 2023/09/08 + * Version: @(#)version.h 1.0.12 2023/09/16 * * Author: Fred N. van Kempen, * @@ -56,7 +56,7 @@ #define APP_VER_MAJOR 1 #define APP_VER_MINOR 0 #define APP_VER_REV 20 -#define APP_VER_PATCH 1 +#define APP_VER_PATCH 2 /* Standard C preprocessor macros. */