~ubuntu-branches/ubuntu/wily/ddccontrol/wily

« back to all changes in this revision

Viewing changes to debian/patches/0002_cerrors.patch

  • Committer: Package Import Robot
  • Author(s): Barry deFreese
  • Date: 2013-07-01 16:58:49 UTC
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: package-import@ubuntu.com-20130701165849-mmk5lwbgwrdh8gca
Tags: 0.4.2-11
* QA upload.
* Link to libm. (Closes: #713540).
* Add patch to prevent buffer overrun. (Closes: #639932).
* Bump debhelper build-dep and compat to 9.
  + Adds hardening flags.
  + Patch for errors found by hardening flags.
  + Make package multi-arch compliant.
* Bump Standards Version to 3.9.4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Fix compilations errors caused by enabling hardening flags.
 
2
Author: Barry deFreese <bdefreese@debian.org>
 
3
Index: ddccontrol-0.4.2/src/lib/conf.c
 
4
===================================================================
 
5
--- ddccontrol-0.4.2.orig/src/lib/conf.c        2006-06-15 12:45:19.000000000 -0400
 
6
+++ ddccontrol-0.4.2/src/lib/conf.c     2013-07-01 17:37:02.000000000 -0400
 
7
@@ -192,13 +192,13 @@
 
8
                rc = xmlTextWriterStartElement(writer, BAD_CAST "monitor");
 
9
                DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterStartElement monitor\n", {xmlFreeTextWriter(writer);})
 
10
 
 
11
-               rc = xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "filename", current->filename);
 
12
+               rc = xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "filename", "%s", current->filename);
 
13
                DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterWriteFormatAttribute filename\n", {xmlFreeTextWriter(writer);})
 
14
 
 
15
                rc = xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "supported", "%d", current->supported);
 
16
                DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterWriteFormatAttribute supported\n", {xmlFreeTextWriter(writer);})
 
17
 
 
18
-               rc = xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "name", current->name);
 
19
+               rc = xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "name", "%s", current->name);
 
20
                DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterWriteFormatAttribute name\n", {xmlFreeTextWriter(writer);})
 
21
 
 
22
                rc = xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "digital", "%d", current->digital);