aboutsummaryrefslogtreecommitdiff
path: root/audio/audtty/patches/02-fix_possible_overflow.patch
blob: 2d71ee304f49ab7683043999c83d14c6deb71bba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From 92bcd204331ba673073acc25c7480cddce1e2b87 Mon Sep 17 00:00:00 2001
From: Chris Taylor <chris@code-monkeys.org>
Date: Fri, 05 Mar 2010 06:11:41 +0000
Subject: Fix possible overflow.

Signed-off-by: Chris Taylor <chris@code-monkeys.org>
---
diff --git a/playlist_create.c b/playlist_create.c
index 475a494..f8f84c5 100644
--- a/playlist_create.c
+++ b/playlist_create.c
@@ -67,7 +67,7 @@ void playlist_create( void )
 					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