#! /bin/sh /usr/share/dpatch/dpatch-run ## 03_bugfix_buffer_overflow.dpatch by Yannic Scheper ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Fix possible buffer overflow in function LoadLevel @DPATCH@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' pacman4console-1.2~/pacman.c pacman4console-1.2/pacman.c --- pacman4console-1.2~/pacman.c 2006-12-14 05:51:58.000000000 +0100 +++ pacman4console-1.2/pacman.c 2011-09-13 10:58:43.324575045 +0200 @@ -59,6 +59,7 @@ //If they specified a level to load if((argc > 1) && (strlen(argv[1]) > 1)) { + argv[1][99] = '\0'; LoadLevel(argv[1]); MainLoop(); }