[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#685788: unblock: vite/1.2+svn1347-2



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package vite

The difference between testing vite/1.2+svn1347-1 and sid
vite/1.2+svn1347-2 is an upstream patch fixing a crash on big line
number (>= 1 million), as can be seen below.

unblock vite/1.2+svn1347-2

--- a/src/common/Errors.cpp.original	2012-08-03 22:17:21.687362090 +0200
+++ b/src/common/Errors.cpp	2012-08-03 22:19:56.516207713 +0200
@@ -118,8 +118,8 @@
 }
 
 void Error::set(const string kind_of_error, const unsigned int line_number, const int priority){
-    char line[10];
-    sprintf(line, "%d : ", line_number);
+    char line[sizeof(line_number)*3+3+1];
+    snprintf(line, sizeof(line), "%d : ", line_number);
     set(line + kind_of_error, priority);
 }
 
@@ -129,8 +129,8 @@
 }
 
 void Error::set_and_print(const string kind_of_error, const unsigned int line_number, const int priority){
-    char line[10];
-    sprintf(line, "%d", line_number);
+    char line[sizeof(line_number)*3+1];
+    snprintf(line, sizeof(line), "%d", line_number);
     set(kind_of_error + " on line " + line, priority);
     print(priority);
 }
@@ -138,8 +138,8 @@
 
 bool Error::set_if(bool condition, const string kind_of_error, const unsigned int line_number, const int priority){
     if(condition){
-        char line[10];
-        sprintf(line, "%d", line_number);
+        char line[sizeof(line_number)*3+1];
+        snprintf(line, sizeof(line), "%d", line_number);
         set(kind_of_error + " on line " + line, priority);
         return true;
     }

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.0.4 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

-- 
Samuel Thibault <samuel.thibault@ens-lyon.org>
requests.</FONT></SPAN></TD></TR></TBODY></TABLE></DIV></BODY></HTML>agnjo
gj a po  mi
shnthdrdcvallus hsx mvgduwolgfwtq
uzuy
s
p
h
 -+- spams forever ... -+- 


Reply to: