OSDN Git Service
(root)
/
android-x86
/
system-extras.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
3130a32
)
ext4_utils: fix build error without FILE_CONTEXTS
author
Sungmin Choi
<sungmin.choi@lge.com>
Mon, 25 Feb 2013 06:37:51 +0000
(15:37 +0900)
committer
Sungmin Choi
<sungmin.choi@lge.com>
Mon, 25 Feb 2013 06:39:45 +0000
(15:39 +0900)
After commit
4df62f342dbbe2f5cca831ce789dc0426d32ec03
,
occurs segmentation fault if mkuserimg.sh runs without FILE_CONTEXTS options.
It's due to strlen() for null value. To fix it, return 0 for null.
Change-Id: Icf99706e51b9053a24e23b9d081a258962877c30
ext4_utils/contents.c
patch
|
blob
|
history
diff --git
a/ext4_utils/contents.c
b/ext4_utils/contents.c
index
4899648
..
586e97e
100644
(file)
--- a/
ext4_utils/contents.c
+++ b/
ext4_utils/contents.c
@@
-467,6
+467,9
@@
static int xattr_add(u32 inode_num, int name_index, const char *name,
int inode_set_selinux(u32 inode_num, const char *secon)
{
+ if (!secon)
+ return 0;
+
return xattr_add(inode_num, EXT4_XATTR_INDEX_SECURITY,
XATTR_SELINUX_SUFFIX, secon, strlen(secon) + 1);
}