summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-10-08 12:41:00 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-10-08 12:41:00 -0700
commit73ab71f905d7b27bde4ba363ebbf72b76a5fabc6 (patch)
tree9d18ac551b72cbfa0bbef1b233f1a725a1aed364
parent36a8f95bd06852c5e63f19bce63fcd596bd02610 (diff)
downloadnasm-73ab71f905d7b27bde4ba363ebbf72b76a5fabc6.tar.gz
nasm-73ab71f905d7b27bde4ba363ebbf72b76a5fabc6.tar.bz2
nasm-73ab71f905d7b27bde4ba363ebbf72b76a5fabc6.zip
saa_rstruct: fix overrun check
The direction of the overrun test in saa_rstruct was backwards.
-rw-r--r--nasmlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nasmlib.c b/nasmlib.c
index c98834c..0a0bb95 100644
--- a/nasmlib.c
+++ b/nasmlib.c
@@ -610,7 +610,7 @@ void *saa_rstruct(struct SAA *s)
{
void *p;
- if (s->rptr + s->elem_len < s->datalen)
+ if (s->rptr + s->elem_len > s->datalen)
return NULL;
if (s->rpos % s->elem_len)