SHA256
1
0
forked from pool/alsa-utils
alsa-utils/0002-alsactl-Fix-the-string-size-for-the-lock-file-contents.patch
Takashi Iwai 3ca16f59da Accepting request 171088 from home:sumski:branches:multimedia:libs
- Added patch from upstream, which fixes buffer overflow,
  0002-alsactl-Fix-the-string-size-for-the-lock-file-contents.patch

OBS-URL: https://build.opensuse.org/request/show/171088
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=76
2013-04-16 10:56:47 +00:00

29 lines
760 B
Diff

From 95788fea25c1a59985828d4b91af0772d077600b Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Mon, 15 Apr 2013 14:44:13 +0200
Subject: [PATCH 1/1] alsactl: Fix the string size for the lock file contents
The string length is 10 characters + LF + '\0' = 12 characters.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
alsactl/lock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/alsactl/lock.c b/alsactl/lock.c
index d34d013..fce208b 100644
--- a/alsactl/lock.c
+++ b/alsactl/lock.c
@@ -35,7 +35,7 @@ static int state_lock_(const char *file, int lock, int timeout)
int fd = -1, err = 0;
struct flock lck;
struct stat st;
- char lcktxt[11];
+ char lcktxt[12];
char *nfile;
if (!do_lock)
--
1.7.11.4