Summary: | segfault in cdcd due to bug in libcdaudio 0.99.6 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sam Yates <sam> |
Component: | Current packages | Assignee: | SpanKY <vapier> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | 1.4_rc1 | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 12210 | ||
Attachments: | Fixes wrong fprintf() call, plus some error checks. |
Description
Sam Yates
2002-12-15 12:25:00 UTC
- send(sock, outbuffer, strlen(outbuffer), 0); + if (send(sock, outbuffer, strlen(outbuffer), 0)<0) + return -1; + free(outbuffer); wouldnt it be better to save the return value, free the buffer, then check the return value ? as it is it looks like you just generated a memleak Yes, you're perfectly correct! Could you pretend I got it right the first time? :) could you please post said patch as an attachement ? when you post it as a comment the whitespace gets all screwed up making the patch invalid ... Created attachment 6549 [details, diff]
Fixes wrong fprintf() call, plus some error checks.
Patch attached - hopefully without memleaks this time!
all set now, thx for the patch http://cvs.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-x86/media-libs/libcdaudio/files/libcdaudio-0.99.6-sanity-checks.patch?rev=1.1&content-type=text/vnd.viewcvs-markup http://cvs.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-x86/media-libs/libcdaudio/libcdaudio-0.99.6-r1.ebuild?rev=1.1&content-type=text/vnd.viewcvs-markup |