diff options
| author | B. Watson <urchlay@slackware.uk> | 2025-12-02 22:12:26 -0500 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2025-12-02 22:12:26 -0500 |
| commit | 939dab58d23272a68c16c625dbd14ff3f8f6c51b (patch) | |
| tree | 3c87c1eacd1269029162d7f0b86cb5da3b4239c4 | |
| parent | d44c3f7cda7eade5c7d46ca72553a47214c20995 (diff) | |
| download | alftools-939dab58d23272a68c16c625dbd14ff3f8f6c51b.tar.gz | |
sanity.c: fix read past the end of an array.
| -rw-r--r-- | src/sanity.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sanity.c b/src/sanity.c index 5b5c787..df3cbe2 100644 --- a/src/sanity.c +++ b/src/sanity.c @@ -38,7 +38,7 @@ void sanity_check_filename(const char *fname) { bad_atari_filename(fname, "does not begin with A-Z"); } - for(i = 0; (c = fname[i]) && i < 12; i++) { + for(i = 0; (i < 12) && (c = fname[i]); i++) { if(c >= 'A' && c <= 'Z') continue; if(c >= '0' && c <= '9') |
