Skip to content

Commit

Permalink
タグフィールド名に「~」を使えないようにさせる
Browse files Browse the repository at this point in the history
https://www.xiph.org/vorbis/doc/v-comment.html#vectorformat
なぜアスキー印字可能文字で「~」だけ禁止する必要があったのか……

これで、以前のバージョンのopuscommentで作られたファイルは-Vオプションで撥ねられる可能性を含ませてしまった
  • Loading branch information
hcmiya committed Jun 1, 2019
1 parent 4b0aed0 commit f66affa
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion nls/C/5.tagerror
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $set 5
$ the record doesn't contain '='
1 no field separator

$ field name has out of 0x20-0x7e
$ field name has out of 0x20-0x7d
2 invalid field name

$ the record begins by '='
Expand Down
2 changes: 1 addition & 1 deletion nls/C@l33t/5.tagerror
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $set 5
$ the record doesn't contain '='
1 n0 f13ld 53p4r470r

$ field name has out of 0x20-0x7e
$ field name has out of 0x20-0x7d
2 1nv4l1d f13ld n4m3

$ the record begins by '='
Expand Down
2 changes: 1 addition & 1 deletion nls/en_US.ISO8859-1/5.tagerror
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $set 5
$ the record doesn't contain '='
1 no field separator

$ field name has out of 0x20-0x7e
$ field name has out of 0x20-0x7d
2 invalid field name

$ the record begins by '='
Expand Down
2 changes: 1 addition & 1 deletion nls/en_US.UTF-8/5.tagerror
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $set 5
$ the record doesn't contain '='
1 no field separator

$ field name has out of 0x20-0x7e
$ field name has out of 0x20-0x7d
2 invalid field name

$ the record begins by '='
Expand Down
2 changes: 1 addition & 1 deletion nls/ja_JP.UTF-8/5.tagerror
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $set 5
$ レコードに'='が無い
1 項目名と値の区切りが存在しない

$ フィールド名がASCIIの0x20〜0x7eに納まっていない
$ フィールド名がASCIIの0x20〜0x7dに納まっていない
2 項目名が不正

$ レコードが'='で始まっていた
Expand Down
2 changes: 1 addition & 1 deletion nls/ja_JP.eucJP/5.tagerror
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $set 5
$ �쥳���ɤ�'='��̵��
1 ����̾���ͤζ��ڤ꤬¸�ߤ��ʤ�

$ �ե������̾��ASCII��0x20��0x7e��Ǽ�ޤäƤ��ʤ�
$ �ե������̾��ASCII��0x20��0x7d��Ǽ�ޤäƤ��ʤ�
2 ����̾������

$ �쥳���ɤ�'='�ǻϤޤäƤ���
Expand Down
4 changes: 2 additions & 2 deletions src/ocutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ static bool test_tag_field_keepcase(uint8_t *line, size_t n, bool *on_field) {
size_t i;
bool valid = true;
for (i = 0; i < n && line[i] != 0x3d; i++) {
if (!(line[i] >= 0x20 && line[i] <= 0x7e)) {
if (!(line[i] >= 0x20 && line[i] <= 0x7d)) {
valid = false;
}
}
Expand All @@ -30,7 +30,7 @@ bool test_tag_field(uint8_t *line, size_t n, bool upcase, bool *on_field, bool *
size_t i;
bool valid = true;
for (i = 0; i < n && line[i] != 0x3d; i++) {
if (!(line[i] >= 0x20 && line[i] <= 0x7e)) {
if (!(line[i] >= 0x20 && line[i] <= 0x7d)) {
valid = false;
}
if (line[i] >= 0x61 && line[i] <= 0x7a) {
Expand Down
6 changes: 3 additions & 3 deletions src/version.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define OPUSCOMMENT_VERSION "1.5.6"
#define OPUSCOMMENT_VERSION "1.5.7"

#define OPUSCOMMENT_REVISION_YEAR (2019 - 1900)
#define OPUSCOMMENT_REVISION_MONTH (5 - 1)
#define OPUSCOMMENT_REVISION_DAY 30
#define OPUSCOMMENT_REVISION_MONTH (6 - 1)
#define OPUSCOMMENT_REVISION_DAY 1

0 comments on commit f66affa

Please sign in to comment.