Hi,

How about this patch as an alternative, which doesn't change the
semantics of the array, but makes sure it is aligned.

Thanks,

-Kees

-- 
Kees Cook                                            @outflux.net
diff -u jfsutils-1.1.12/debian/changelog jfsutils-1.1.12/debian/changelog
--- jfsutils-1.1.12/debian/changelog
+++ jfsutils-1.1.12/debian/changelog
@@ -1,3 +1,10 @@
+jfsutils (1.1.12-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Force struct alignment for string array (Closes: #499078).
+
+ -- Kees Cook <[EMAIL PROTECTED]>  Sun, 26 Oct 2008 12:57:15 -0700
+
 jfsutils (1.1.12-2) unstable; urgency=low
 
   * use different linking parameter on alpha to avoid FTBFS (Closes: #490881)
only in patch2:
unchanged:
--- jfsutils-1.1.12.orig/libfs/super.c
+++ jfsutils-1.1.12/libfs/super.c
@@ -162,7 +162,7 @@
  */
 int ujfs_put_superblk(FILE *fp, struct superblock *sb, int16_t is_primary)
 {
-	char buf[SIZE_OF_SUPER];
+	char buf[SIZE_OF_SUPER] __attribute__ ((aligned(__alignof__(struct superblock))));
 	int rc;
 
 	memset(buf, 0, SIZE_OF_SUPER);

Reply via email to