mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
b91b25e175
Added also some patches from git. Rewritten the gcc/DESTDIR patch Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
From c688fa3851263dc29075182ffdb1ab83051a7213 Mon Sep 17 00:00:00 2001
|
|
From: Chris Taylor <chris@code-monkeys.org>
|
|
Date: Fri, 05 Mar 2010 06:13:15 +0000
|
|
Subject: Fix segfault and possible overflow.
|
|
|
|
-Fix segfault when opening directory, and the buffer length is 0.
|
|
-Fix possible overflow in buffer.
|
|
|
|
Signed-off-by: Chris Taylor <chris@code-monkeys.org>
|
|
---
|
|
diff --git a/browse.c b/browse.c
|
|
index fd06dee..c736e64 100644
|
|
--- a/browse.c
|
|
+++ b/browse.c
|
|
@@ -399,16 +399,19 @@ void open_directory( void )
|
|
get_contents();
|
|
return;
|
|
case ENTER:
|
|
+ if(strlen(buffer)==0) return;
|
|
+ else {
|
|
cont.location=g_strdup(buffer);
|
|
g_chdir(buffer);
|
|
get_contents();
|
|
+ }
|
|
return;
|
|
case KEY_BACKSPACE:
|
|
if (len == 0) break;
|
|
buffer[--len] = '\0';
|
|
break;
|
|
default:
|
|
- if (len == 1025) break;
|
|
+ if (len >= 1024) break;
|
|
if (c < 32) break;
|
|
buffer[len] = c;
|
|
buffer[++len] = '\0';
|
|
--
|
|
cgit v0.8.3.4-115-g1759
|