diff options
| author | Kenichi Handa | 2000-08-04 02:05:39 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-08-04 02:05:39 +0000 |
| commit | e7046a1877c5664dd122fd874b374c4a235865bb (patch) | |
| tree | 4d9efc2b5b157c714c6c5500479adb5e187febca /src/coding.c | |
| parent | 99bb2c60022891acf9557a4656e4eadfb59ddf01 (diff) | |
| download | emacs-e7046a1877c5664dd122fd874b374c4a235865bb.tar.gz emacs-e7046a1877c5664dd122fd874b374c4a235865bb.zip | |
(decode_coding_iso2022): More strict check for handling single
shifting.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/coding.c b/src/coding.c index d67e07687cd..6c251a583dd 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -1471,6 +1471,8 @@ decode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes) | |||
| 1471 | goto label_invalid_code; | 1471 | goto label_invalid_code; |
| 1472 | charset = CODING_SPEC_ISO_DESIGNATION (coding, 2); | 1472 | charset = CODING_SPEC_ISO_DESIGNATION (coding, 2); |
| 1473 | ONE_MORE_BYTE (c1); | 1473 | ONE_MORE_BYTE (c1); |
| 1474 | if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)) | ||
| 1475 | goto label_invalid_code; | ||
| 1474 | break; | 1476 | break; |
| 1475 | 1477 | ||
| 1476 | case 'O': /* invocation of single-shift-3 */ | 1478 | case 'O': /* invocation of single-shift-3 */ |
| @@ -1479,6 +1481,8 @@ decode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes) | |||
| 1479 | goto label_invalid_code; | 1481 | goto label_invalid_code; |
| 1480 | charset = CODING_SPEC_ISO_DESIGNATION (coding, 3); | 1482 | charset = CODING_SPEC_ISO_DESIGNATION (coding, 3); |
| 1481 | ONE_MORE_BYTE (c1); | 1483 | ONE_MORE_BYTE (c1); |
| 1484 | if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)) | ||
| 1485 | goto label_invalid_code; | ||
| 1482 | break; | 1486 | break; |
| 1483 | 1487 | ||
| 1484 | case '0': case '2': case '3': case '4': /* start composition */ | 1488 | case '0': case '2': case '3': case '4': /* start composition */ |