Commit 9652c73
Al Viro
9p: fix misuse of sscanf() in v9fs_stat2inode()
1) sscanf() return value needs to be checked, damnit
2) sscanf() is perfectly capable of checking for fixed prefix,
no need for that %13s + strncmp with constant string.
3) st->extension is a valid string; no need for voodoo with
str*cpy() there.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>1 parent b1adbdb commit 9652c73
1 file changed
Lines changed: 9 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1137 | 1137 | | |
1138 | 1138 | | |
1139 | 1139 | | |
1140 | | - | |
1141 | | - | |
1142 | | - | |
1143 | 1140 | | |
1144 | 1141 | | |
1145 | 1142 | | |
| |||
1157 | 1154 | | |
1158 | 1155 | | |
1159 | 1156 | | |
1160 | | - | |
| 1157 | + | |
| 1158 | + | |
1161 | 1159 | | |
1162 | | - | |
1163 | | - | |
1164 | | - | |
1165 | | - | |
1166 | | - | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
1167 | 1165 | | |
1168 | | - | |
1169 | 1166 | | |
1170 | | - | |
1171 | | - | |
| 1167 | + | |
| 1168 | + | |
1172 | 1169 | | |
1173 | 1170 | | |
1174 | 1171 | | |
| |||
0 commit comments