File: 02_fix_login_overflow.patch

package info (click to toggle)
wdm 1.28-27
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,520 kB
  • sloc: ansic: 11,439; sh: 1,033; makefile: 377; perl: 32; cpp: 10
file content (25 lines) | stat: -rw-r--r-- 827 bytes parent folder | download | duplicates (5)
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
Author: Vlad Shakhov <lumpen.intellectual@gmail.com>
Description: Increase the size of buffers for name/password to follow the protocol.
Cleanup name/password buffers before use.
Bug-Debian: https://bugs.debian.org/276218.
--- wdm.orig/src/wdm/Greet.c
+++ wdm/src/wdm/Greet.c
@@ -134,7 +134,8 @@
 extern int   wdmXineramaHead;
 
 static int      pipe_filedes[2];
-static char	name[128], password[128];
+#define CREDENTIAL_LEN 258
+static char	name[CREDENTIAL_LEN], password[CREDENTIAL_LEN];
 static char     xsessionArg[256], exitArg[256];
 
 struct display *Save_d=NULL;
@@ -280,6 +281,8 @@
 {
     int code = 0, done = 0, extension_code=0;
 
+    memset(name, 0, CREDENTIAL_LEN );
+    memset(password, 0, CREDENTIAL_LEN);
     readstring(pipe_filedes[0], name);  /* username */
     readstring(pipe_filedes[0], password);