summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Crayne <chuck@thor.crayne.org>2007-10-07 18:46:57 -0700
committerCharles Crayne <chuck@thor.crayne.org>2007-10-07 18:46:57 -0700
commit43f699b9bd9e9a3340fbdd17b869ae3148d9bfe8 (patch)
tree89462d9c953465fb240e64613d401423461f6305
parent30c3ad102412fe5b7feed15a6b75458a7fb21097 (diff)
downloadnasm-43f699b9bd9e9a3340fbdd17b869ae3148d9bfe8.tar.gz
nasm-43f699b9bd9e9a3340fbdd17b869ae3148d9bfe8.tar.bz2
nasm-43f699b9bd9e9a3340fbdd17b869ae3148d9bfe8.zip
Fix infinite loop in function saa_fpwrite
-rw-r--r--nasmlib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/nasmlib.c b/nasmlib.c
index 7404483..9c24db7 100644
--- a/nasmlib.c
+++ b/nasmlib.c
@@ -727,6 +727,7 @@ void saa_fpwrite(struct SAA *s, FILE * fp)
size_t len;
saa_rewind(s);
+ len = s->datalen;
while ((data = saa_rbytes(s, &len)) != NULL)
fwrite(data, 1, len, fp);
}