Blame openssh-6.8p1-memory-problems.patch
|
Jakub Jelen |
8244d5 |
diff --git a/servconf.c b/servconf.c
|
|
Jakub Jelen |
8244d5 |
index ad5869b..0255ed3 100644
|
|
Jakub Jelen |
8244d5 |
--- a/servconf.c
|
|
Jakub Jelen |
8244d5 |
+++ b/servconf.c
|
|
Jakub Jelen |
8244d5 |
@@ -1910,6 +1910,8 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)
|
|
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 |
8244d5 |
M_CP_INTOPT(rsa_authentication);
|
|
Jakub Jelen |
8244d5 |
@@ -1947,8 +1949,10 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)
|
|
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 |
8244d5 |
|