snack-2.2.10-CVE-2012-6303.patch - Drop the demos, they violate too many rpmlint rules. OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/snack?expand=0&rev=12
21 lines
719 B
Diff
21 lines
719 B
Diff
Index: snack2.2.10/generic/jkSoundFile.c
|
|
===================================================================
|
|
--- snack2.2.10.orig/generic/jkSoundFile.c
|
|
+++ snack2.2.10/generic/jkSoundFile.c
|
|
@@ -1793,7 +1793,14 @@ static int
|
|
GetHeaderBytes(Sound *s, Tcl_Interp *interp, Tcl_Channel ch, char *buf,
|
|
int len)
|
|
{
|
|
- int rlen = Tcl_Read(ch, &buf[s->firstNRead], len - s->firstNRead);
|
|
+ int rlen;
|
|
+
|
|
+ if (len > max(CHANNEL_HEADER_BUFFER, HEADBUF)){
|
|
+ Tcl_AppendResult(interp, "Excessive header size", NULL);
|
|
+ return TCL_ERROR;
|
|
+ }
|
|
+
|
|
+ rlen = Tcl_Read(ch, &buf[s->firstNRead], len - s->firstNRead);
|
|
|
|
if (rlen < len - s->firstNRead){
|
|
Tcl_AppendResult(interp, "Failed reading header bytes", NULL);
|