Commit 8dbe5b21 authored by Jari Aalto's avatar Jari Aalto

debian/patches: (30): New. Support spaces in authentication data

Signed-off-by: 's avatarJari Aalto <jari.aalto@cante.net>
parent b787cfb5
From: Filip Zyzniewski
Subject: support spaces in authentication data
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/corkscrew/+bug/962921
--- corkscrew-2.0-orig/corkscrew.c 2012-03-23 09:19:42.000000000 +0100
+++ corkscrew-2.0/corkscrew.c 2012-03-23 10:14:56.958789922 +0100
@@ -203,9 +203,18 @@
exit(-1);
} else {
char line[4096];
- fscanf(fp, "%s", line);
- up = malloc(sizeof(line));
- up = line;
+ char *eol = line;
+ int linelen;
+ linelen = fread(line, 1, 4095, fp);
+ if (ferror(fp)) {
+ fprintf(stderr, "Error reading %s: %s\n", argv[5], strerror(errno));
+ exit(-1);
+ }
+ line[linelen] = '\0';
+ eol = strchr(line, '\n');
+ if (eol)
+ *eol = '\0';
+ up = strdup(line);
fclose(fp);
}
}
10-readme-path.patch
20-corkscrew.c.patch
30-spaces-in-authentication.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment