commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 23/61: ext2fs: fix type of inum


From: Samuel Thibault
Subject: [hurd] 23/61: ext2fs: fix type of inum
Date: Tue, 27 May 2014 08:32:11 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 749820d7dcf8ba05d025f985f0fdc17bd6658489
Author: Justus Winter <address@hidden>
Date:   Thu Apr 24 17:32:04 2014 +0200

    ext2fs: fix type of inum
    
    Previously, inum was of type int, whereas dino_ref expects ino_t.  On
    Hurd/x86 the former is 32 bit wide, the latter 64.  If dino_ref is
    inlined, this does not seem to pose a problem, but if ext2fs is
    compiled with -O0, this most likely results in an invalid memory access.
    
    * ext2fs/ialloc.c (ext2_alloc_inode): Use type ino_t for inum.
---
 ext2fs/ialloc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ext2fs/ialloc.c b/ext2fs/ialloc.c
index 2d8e51e..52212d5 100644
--- a/ext2fs/ialloc.c
+++ b/ext2fs/ialloc.c
@@ -115,7 +115,8 @@ ino_t
 ext2_alloc_inode (ino_t dir_inum, mode_t mode)
 {
   char *bh = NULL;
-  int i, j, inum, avefreei;
+  int i, j, avefreei;
+  ino_t inum;
   struct ext2_group_desc *gdp;
   struct ext2_group_desc *tmp;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]