X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=cl_video_jamdecode.c;h=a652dbc221734955ef5480e630fb9ecd1f5da783;hb=1de4cbbf14919125d9e29e9cecb843aeb9c6daf6;hp=05650016f9c523fd4d0449993bab8bc7bcca75a4;hpb=a4b2d95480eae2fbdae1bd9e2fd96556a647c2e1;p=xonotic%2Fdarkplaces.git diff --git a/cl_video_jamdecode.c b/cl_video_jamdecode.c index 05650016..a652dbc2 100644 --- a/cl_video_jamdecode.c +++ b/cl_video_jamdecode.c @@ -250,7 +250,7 @@ readframe: { compsize = LittleLong(*(frameHead + 8)) - 16; outsize = LittleLong(*(frameHead + 12)); - if (compsize < 0 || compsize > s->framesize || outsize < 0 || outsize > s->framesize) + if (compsize > s->framesize || outsize > s->framesize) s->error = JAMDECODEERROR_BAD_FRAME_HEADER; else if (FS_Read(s->file, s->compressed, compsize)) { @@ -352,4 +352,4 @@ readframe: else s->error = DPVSIMPLEDECODEERROR_EOF; return s->error; -} \ No newline at end of file +}