[nasm:nasm-2.15.xx] rdoff/rdfwriteheader: Write object length and header length in correct order

nasm-bot for Ozkan Sezer sezeroz at gmail.com
Fri Oct 9 14:15:07 PDT 2020


Commit-ID:  723fb2cc3309b9963620e8b54f3709e7a3331c57
Gitweb:     http://repo.or.cz/w/nasm.git?a=commitdiff;h=723fb2cc3309b9963620e8b54f3709e7a3331c57
Author:     Ozkan Sezer <sezeroz at gmail.com>
AuthorDate: Mon, 5 Oct 2020 00:41:40 +0300
Committer:  Cyrill Gorcunov <gorcunov at gmail.com>
CommitDate: Sat, 10 Oct 2020 00:13:07 +0300

rdoff/rdfwriteheader: Write object length and header length in correct order

Compared to 2.12.xx rdfwriteheader() writes the object length and header
length in flipped order.  Issue seems to have been introduced by commit
8dc965347ddf.

BR3392717

Signed-off-by: Ozkan Sezer <sezeroz at gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>


---
 rdoff/rdoff.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rdoff/rdoff.c b/rdoff/rdoff.c
index 77f2b42f..3057f84f 100644
--- a/rdoff/rdoff.c
+++ b/rdoff/rdoff.c
@@ -612,8 +612,8 @@ int rdfwriteheader(FILE * fp, rdf_headerbuf * h)
 
     l = membuflength(h->buf);
     l2 = l + 14 + 10 * h->nsegments + h->seglength;
-    fwriteint32_t(l, fp);
-    fwriteint32_t(l2, fp);
+    fwriteint32_t(l2, fp);      /* object length */
+    fwriteint32_t(l, fp);       /* header length */
 
     membufdump(h->buf, fp);
 


More information about the Nasm-commits mailing list