]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/libosip2/0001-fix-bug-report-sr-109133-Heap-buffer-overflow-in-uti.patch
lrzsz: install symlinks for XMODEM and YMODEM
[coffee/buildroot.git] / package / libosip2 / 0001-fix-bug-report-sr-109133-Heap-buffer-overflow-in-uti.patch
1 From 7e0793e15e21f68337e130c67b031ca38edf055f Mon Sep 17 00:00:00 2001
2 From: Aymeric Moizard <amoizard@gmail.com>
3 Date: Mon, 5 Sep 2016 15:01:53 +0200
4 Subject: [PATCH]  * fix bug report: sr #109133: Heap buffer overflow in
5  utility function *osip_clrncpy*    https://savannah.gnu.org/support/?109133
6
7 Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
8 ---
9  src/osipparser2/osip_port.c | 4 +++-
10  1 file changed, 3 insertions(+), 1 deletion(-)
11
12 diff --git a/src/osipparser2/osip_port.c b/src/osipparser2/osip_port.c
13 index 0e64147..d8941b0 100644
14 --- a/src/osipparser2/osip_port.c
15 +++ b/src/osipparser2/osip_port.c
16 @@ -1291,8 +1291,10 @@ osip_clrncpy (char *dst, const char *src, size_t len)
17         char *p;
18         size_t spaceless_length;
19  
20 -       if (src == NULL)
21 +       if (src == NULL || len == 0) {
22 +               *dst = '\0';
23                 return NULL;
24 +       }
25  
26         /* find the start of relevant text */
27         pbeg = src;
28 -- 
29 2.11.0
30