[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Tomasz Kojm tkojm at clamav.net
Sun Apr 4 00:59:14 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit e0b395b3c7942f97d36d192f1df4342303dc9274
Author: Tomasz Kojm <tkojm at clamav.net>
Date:   Mon Jul 27 12:28:42 2009 +0200

    libclamav/macho.c: fix section alignment (bb#1667)

diff --git a/ChangeLog b/ChangeLog
index 153dc95..c431a0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Jul 27 12:28:08 CEST 2009 (tk)
+----------------------------------
+ * libclamav/macho.c: fix section alignment (bb#1667)
+
 Sun Jul 26 18:55:37 CEST 2009 (acab)
 ------------------------------------
  * shared/actions.c: wrap unistd - reported by njh
diff --git a/libclamav/macho.c b/libclamav/macho.c
index 5b06aff..a3adbf0 100644
--- a/libclamav/macho.c
+++ b/libclamav/macho.c
@@ -380,7 +380,7 @@ int cli_scanmacho(int fd, cli_ctx *ctx, struct cli_exe_info *fileinfo)
 		    sections[sect].rva = EC64(section64.addr, conv);
 		    sections[sect].vsz = EC64(section64.size, conv);
 		    sections[sect].raw = EC32(section64.offset, conv);
-		    section64.align = EC32(section64.align, conv);
+		    section64.align = 1 << EC32(section64.align, conv);
 		    sections[sect].rsz = sections[sect].vsz + (section64.align - (sections[sect].vsz % section64.align)) % section64.align; /* most likely we can assume it's the same as .vsz */
 		    strncpy(name, section64.sectname, 16);
 		} else {
@@ -392,7 +392,7 @@ int cli_scanmacho(int fd, cli_ctx *ctx, struct cli_exe_info *fileinfo)
 		    sections[sect].rva = EC32(section.addr, conv);
 		    sections[sect].vsz = EC32(section.size, conv);
 		    sections[sect].raw = EC32(section.offset, conv);
-		    section.align = EC32(section.align, conv);
+		    section.align = 1 << EC32(section.align, conv);
 		    sections[sect].rsz = sections[sect].vsz + (section.align - (sections[sect].vsz % section.align)) % section.align;
 		    strncpy(name, section.sectname, 16);
 		}

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list