Blame openssh-6.8p1-memory-problems.patch
|
Jakub Jelen |
6cf9b8 |
diff -up openssh-7.4p1/servconf.c.memory openssh-7.4p1/servconf.c
|
|
Jakub Jelen |
6cf9b8 |
--- openssh-7.4p1/servconf.c.memory 2016-12-23 15:37:48.181422360 +0100
|
|
Jakub Jelen |
6cf9b8 |
+++ openssh-7.4p1/servconf.c 2016-12-23 15:38:30.189429116 +0100
|
|
Jakub Jelen |
6cf9b8 |
@@ -2006,6 +2006,8 @@ copy_set_server_options(ServerOptions *d
|
|
Jakub Jelen |
8244d5 |
dst->n = src->n; \
|
|
Jakub Jelen |
8244d5 |
} while (0)
|
|
Jakub Jelen |
8244d5 |
|
|
Jakub Jelen |
8244d5 |
+ u_int i;
|
|
Jakub Jelen |
8244d5 |
+
|
|
Jakub Jelen |
8244d5 |
M_CP_INTOPT(password_authentication);
|
|
Jakub Jelen |
8244d5 |
M_CP_INTOPT(gss_authentication);
|
|
Jakub Jelen |
6cf9b8 |
M_CP_INTOPT(pubkey_authentication);
|
|
Jakub Jelen |
6cf9b8 |
@@ -2058,8 +2060,10 @@ copy_set_server_options(ServerOptions *d
|
|
Jakub Jelen |
8244d5 |
} while(0)
|
|
Jakub Jelen |
8244d5 |
#define M_CP_STRARRAYOPT(n, num_n) do {\
|
|
Jakub Jelen |
8244d5 |
if (src->num_n != 0) { \
|
|
Jakub Jelen |
8244d5 |
+ for (i = 0; i < dst->num_n; i++) \
|
|
Jakub Jelen |
8244d5 |
+ free(dst->n[i]); \
|
|
Jakub Jelen |
8244d5 |
for (dst->num_n = 0; dst->num_n < src->num_n; dst->num_n++) \
|
|
Jakub Jelen |
8244d5 |
- dst->n[dst->num_n] = xstrdup(src->n[dst->num_n]); \
|
|
Jakub Jelen |
8244d5 |
+ dst->n[dst->num_n] = src->n[dst->num_n]; \
|
|
Jakub Jelen |
8244d5 |
} \
|
|
Jakub Jelen |
8244d5 |
} while(0)
|
|
Jakub Jelen |
5b55d0 |
#define M_CP_STRARRAYOPT_ALLOC(n, num_n) do { \
|