diff options
author | Nick Clifton <nickc@redhat.com> | 2002-01-07 17:51:18 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2002-01-07 17:51:18 +0000 |
commit | ceac3f627118f6e5933d38a6726a104bdbd6d7de (patch) | |
tree | 4bb6194e074b333ffe61d6bfa83a10db0cc2e191 /gas/read.c | |
parent | be2d1673e40d3e6de84cddb2a9c27140b390808f (diff) | |
download | gdb-ceac3f627118f6e5933d38a6726a104bdbd6d7de.zip gdb-ceac3f627118f6e5933d38a6726a104bdbd6d7de.tar.gz gdb-ceac3f627118f6e5933d38a6726a104bdbd6d7de.tar.bz2 |
do not allow size or nbytes to go negative.
Diffstat (limited to 'gas/read.c')
-rw-r--r-- | gas/read.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -3683,7 +3683,7 @@ emit_expr (exp, nbytes) } nums = generic_bignum + size / CHARS_PER_LITTLENUM; - while (size > 0) + while (size >= CHARS_PER_LITTLENUM) { --nums; md_number_to_chars (p, (valueT) *nums, CHARS_PER_LITTLENUM); @@ -3694,7 +3694,7 @@ emit_expr (exp, nbytes) else { nums = generic_bignum; - while (size > 0) + while (size >= CHARS_PER_LITTLENUM) { md_number_to_chars (p, (valueT) *nums, CHARS_PER_LITTLENUM); ++nums; @@ -3703,7 +3703,7 @@ emit_expr (exp, nbytes) nbytes -= CHARS_PER_LITTLENUM; } - while (nbytes > 0) + while (nbytes >= CHARS_PER_LITTLENUM) { md_number_to_chars (p, extra_digit, CHARS_PER_LITTLENUM); nbytes -= CHARS_PER_LITTLENUM; |