~ubuntu-branches/ubuntu/breezy/bumprace/breezy

« back to all changes in this revision

Viewing changes to debian/patches/001_buffer-overflow.patch

  • Committer: Bazaar Package Importer
  • Author(s): Christian T. Steigies
  • Date: 2005-07-05 21:04:29 UTC
  • mfrom: (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050705210429-3f7gs0309b12t96i
Tags: 1.4.6-5
* added automatic config.{sub|guess} updating (closes: #316793)
* GNU config automated update: config.sub (20021130 to 20050422),
  config.guess (20021130 to 20050422)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- src/options.c-orig  2003-07-28 19:01:27.000000000 +0100
 
2
+++ src/options.c       2003-07-28 19:02:08.000000000 +0100
 
3
@@ -9,8 +9,11 @@
 
4
     char filename[200];
 
5
     FILE *file;
 
6
     
 
7
-    if ((char *)getenv("HOME") != NULL)
 
8
-       sprintf( filename, "%s/.bumprace", getenv("HOME"));
 
9
+    if ((char *)getenv("HOME") != NULL) {
 
10
+        memset( filename, '\0', sizeof(filename));
 
11
+       snprintf( filename, sizeof(filename)-1, "%s/.bumprace", 
 
12
+                 getenv("HOME"));
 
13
+    }
 
14
     else
 
15
        sprintf( filename, "bumprace.dat");
 
16
 
 
17
 
 
18