Package: dvd+rw-format
Version: 7.1-3
Severity: normal
Tags: patch
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu intrepid ubuntu-patch

Hello!

dvd+rw-format does not safely call wctomb, which is detected when
compiling with -D_FORTIFY_SOURCE=2 (either directly or via the
"hardening-wrapper" package).  It seems Fedora already has a patch for
this, but never sent it upstream:

http://cvs.fedoraproject.org/viewvc//devel/dvd+rw-tools/dvd+rw-tools-7.0-wctomb.patch?view=markup

There are a number of other patches as well, which might be of interest:

http://daniel.holba.ch/harvest/handler.py?pkg=dvd+rw-tools

Attached is the patch used in Ubuntu.

Thanks!

-Kees

-- 
Kees Cook                                            @outflux.net
#! /bin/sh /usr/share/dpatch/dpatch-run
## 20-wctomb.dpatch by Kees Cook <[EMAIL PROTECTED]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: wctomb called with too small a buffer.
## DP: 
http://cvs.fedoraproject.org/viewvc//devel/dvd+rw-tools/dvd+rw-tools-7.0-wctomb.patch?view=markup
## DP: https://launchpad.net/bugs/235381

@DPATCH@
diff -urNad dvd+rw-tools-7.1~/transport.hxx dvd+rw-tools-7.1/transport.hxx
--- dvd+rw-tools-7.1~/transport.hxx     2008-09-04 09:56:34.000000000 -0700
+++ dvd+rw-tools-7.1/transport.hxx      2008-09-04 09:57:01.000000000 -0700
@@ -124,7 +124,7 @@
 extern "C" char *plusminus_locale()
 { static class __plusminus {
     private:
-       char str[4];
+       char str[MB_LEN_MAX];
     public:
        __plusminus()   {   setlocale(LC_CTYPE,ENV_LOCALE);
                            int l = wctomb(str,(wchar_t)(unsigned char)'�');

Reply via email to