]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Fixes a problem from the last bugfix checkin, picked up by QA on fuzzy.
authorNathan Scott <nathans@sgi.com>
Thu, 13 Dec 2001 09:18:24 +0000 (09:18 +0000)
committerNathan Scott <nathans@sgi.com>
Thu, 13 Dec 2001 09:18:24 +0000 (09:18 +0000)
Since sb_dirblklog is only 8bits long, we can no longer use a pointer to
an integer when looking for non-zero memory - this gives alignment issues
and takes us past the end of our dynamically allocated memory.  Chalk one
up to QA and electric fence.

repair/agheader.c

index 36b4b37edd80c81fad0e55ed31485afd6c3ea84f..61590147a1564308c3568042dcf2c76811963dc1 100644 (file)
@@ -218,7 +218,7 @@ secondary_sb_wack(xfs_mount_t *mp, xfs_buf_t *sbuf, xfs_sb_t *sb,
 {
        int do_bzero;
        int size;
-       int *ip;
+       char *ip;
        int rval;
 
        rval = do_bzero = 0;
@@ -247,8 +247,8 @@ secondary_sb_wack(xfs_mount_t *mp, xfs_buf_t *sbuf, xfs_sb_t *sb,
                else
                        size = (__psint_t)&sb->sb_width
                                + sizeof(sb->sb_width) - (__psint_t)sb;
-               for (ip = (int *)((__psint_t)sb + size);
-                    ip < (int *)((__psint_t)sb + mp->m_sb.sb_sectsize);
+               for (ip = (char *)((__psint_t)sb + size);
+                    ip < (char *)((__psint_t)sb + mp->m_sb.sb_sectsize);
                     ip++)  {
                        if (*ip)  {
                                do_bzero = 1;