# HG changeset patch # User diego # Date 1185645739 0 # Node ID 572f7077ba4076ffbec55985f00c3cd3790a7b5e # Parent e3fab578269d1cfb19b8c62f48edb560711a200d Fix get_str/get_str8() to also work if the target string is not long enough to fit all data from the container string, and allow NULL as a string also to simply skip the string altogether. patch by Ronald S. Bultje, rsbultje gmail com diff -r e3fab578269d -r 572f7077ba40 rmdec.c --- a/rmdec.c Sat Jul 28 12:46:26 2007 +0000 +++ b/rmdec.c Sat Jul 28 18:02:19 2007 +0000 @@ -25,29 +25,31 @@ static void get_str(ByteIOContext *pb, char *buf, int buf_size) { int len, i; - char *q; + char *q, r; len = get_be16(pb); q = buf; for(i=0;i 0) *q = '\0'; } static void get_str8(ByteIOContext *pb, char *buf, int buf_size) { int len, i; - char *q; + char *q, r; len = get_byte(pb); q = buf; for(i=0;i 0) *q = '\0'; } static int rm_read_audio_stream_info(AVFormatContext *s, AVStream *st,