Commit e82bd6c
commit: reject overlong UTF-8 sequences
The commit code accepts pseudo-UTF-8 sequences that encode a character with more
bytes than necessary. Reject such sequences, since they are not valid UTF-8.
Signed-off-by: brian m. carlson <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 28110d4 commit e82bd6c
2 files changed
+22
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1240 | 1240 | | |
1241 | 1241 | | |
1242 | 1242 | | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
1243 | 1246 | | |
1244 | 1247 | | |
1245 | 1248 | | |
1246 | 1249 | | |
1247 | 1250 | | |
| 1251 | + | |
1248 | 1252 | | |
1249 | 1253 | | |
1250 | 1254 | | |
| |||
1276 | 1280 | | |
1277 | 1281 | | |
1278 | 1282 | | |
1279 | | - | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
1280 | 1287 | | |
| 1288 | + | |
| 1289 | + | |
1281 | 1290 | | |
1282 | 1291 | | |
1283 | 1292 | | |
| |||
1290 | 1299 | | |
1291 | 1300 | | |
1292 | 1301 | | |
1293 | | - | |
1294 | | - | |
| 1302 | + | |
| 1303 | + | |
1295 | 1304 | | |
1296 | 1305 | | |
1297 | 1306 | | |
| |||
1308 | 1317 | | |
1309 | 1318 | | |
1310 | 1319 | | |
1311 | | - | |
1312 | | - | |
1313 | | - | |
1314 | 1320 | | |
1315 | 1321 | | |
1316 | 1322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
51 | 61 | | |
52 | 62 | | |
53 | 63 | | |
| |||
0 commit comments