File: buffer-overflow

package info (click to toggle)
ebook-speaker 6.2.0-6
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,140 kB
  • sloc: ansic: 7,336; sh: 4,849; makefile: 553; sed: 16
file content (27 lines) | stat: -rw-r--r-- 649 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
commit fb7ab251fb6fa733f9a3640add8fc82d37582a72
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Tue Apr 16 07:44:55 2024 +0900

    Fix buffer overflow
    
    In get_list_of_sound_devices's strcpy call, strrchr(str, '[') + 1 may be
    
    off]\n
    
    which is 6 bytes.

diff --git a/src/daisy.h b/src/daisy.h
index 4ce9992..c73bed0 100644
--- a/src/daisy.h
+++ b/src/daisy.h
@@ -137,8 +137,8 @@ typedef struct Audio_Info
    LSX_PARAM_IN_Z char device[10];
    LSX_PARAM_IN_OPT_Z char type[15];
    char name[100];
-   char muted[5];
-   char volume[5];
+   char muted[6];
+   char volume[6];
 } audio_info_t;
 
 typedef enum