hcmiya / opuscomment

Utility to edit Ogg Opus tags/output gain - Ogg Opusのタグ及びOutput Gain情報をvorbiscomment(1)と互換のあるインターフェイスで編集するユーティリティ
MIT License
17 stars 4 forks source link

1.4.6: Segment fault of long tags file #14

Closed zvezdochiot closed 5 years ago

zvezdochiot commented 5 years ago

Long tags file: https://github.com/Sound-Linux-More/opuscomment/blob/master/doc/samples/sample_audiobook.opustags

cat sample_audiobook.opustags | while read tline; do echo "$tline"; echo "$tline" | opuscomment -a test.opus; done

Ok.

cat sample_audiobook.opustags | opuscomment -a test.opus
Segment fault
zvezdochiot commented 5 years ago
gdb ./opuscomment
(gdb) break main
Breakpoint 1 at 0x804ecac: file main.c, line 289.
(gdb) r -w test.opus test3.opus < sample_audiobook.opustags
...
340     size_t buflen = 1 << 17;
(gdb) print buflen
$1 = 134541483
(gdb) n
341     uint8_t *buf = ogg_sync_buffer(&oy, buflen);
(gdb) print buflen
$2 = 131072
...
350     open_output_file();
(gdb) n
351     ogg_sync_wrote(&oy, len);
(gdb) print len
$3 = 131072
(gdb) n
352     read_page(&oy);
(gdb) n
[New Thread 0xb7c2fb70 (LWP 32581)]
[New Thread 0xb6c2db70 (LWP 32583)]
[New Thread 0xb742eb70 (LWP 32582)]
[Thread 0xb742eb70 (LWP 32582) exited]

Program received signal SIGSEGV, Segmentation fault.
hcmiya commented 5 years ago

1.3系列では発生しないことを確認

zvezdochiot commented 5 years ago

In 1.3, the Segment Fault does not occur, but the recording of tags is incorrect.