From 5cb6ae4b46fef82a08f5755be37ec528e49ee958 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 21:42:32 +0000 Subject: Apply patch lynx-2.8.9-static-analysis.patch patch_name: lynx-2.8.9-static-analysis.patch present_in_specfile: true --- diff --git a/WWW/Library/Implementation/HTGopher.c b/WWW/Library/Implementation/HTGopher.c index a9ad41e..36ff592 100644 --- a/WWW/Library/Implementation/HTGopher.c +++ b/WWW/Library/Implementation/HTGopher.c @@ -1651,6 +1651,7 @@ static int HTLoadCSO(const char *arg, (*Target->isa->put_block) (Target, buf, (int) strlen(buf)); (*Target->isa->_free) (Target); free_CSOfields(); + BStrFree(command); return HT_LOADED; } /* diff --git a/samples/lynxdump b/samples/lynxdump index f79be2f..a0e9ae2 100755 --- a/samples/lynxdump +++ b/samples/lynxdump @@ -12,4 +12,5 @@ if test $HOME/.lynxrc ; then fi echo 'keypad_mode=NUMBERS_AS_ARROWS' >> $MYTMP/.lynxrc HOME=$MYTMP; export HOME +umask $oldmask lynx -justify -dump -force_html -with_backspaces -nolist $* diff --git a/src/LYBookmark.c b/src/LYBookmark.c index c3116ef..6464d96 100644 --- a/src/LYBookmark.c +++ b/src/LYBookmark.c @@ -303,6 +303,7 @@ void save_bookmark_link(const char *address, LYMBM_statusline(CANCELLED); LYSleepMsg(); FREE(bookmark_URL); + BStrFree(tmp_data); return; } } while (!havevisible(string_data->str)); @@ -347,6 +348,7 @@ void save_bookmark_link(const char *address, LYSleepAlert(); FREE(Title); FREE(bookmark_URL); + BStrFree(tmp_data); return; } diff --git a/src/LYDownload.c b/src/LYDownload.c index cf1ea98..9cf712d 100644 --- a/src/LYDownload.c +++ b/src/LYDownload.c @@ -456,6 +456,7 @@ void LYDownload(char *line) cleanup: FREE(Line); BStrFree(buffer); + BStrFree(command); return; } diff --git a/src/LYLeaks.c b/src/LYLeaks.c index 2f2de28..8c236ff 100644 --- a/src/LYLeaks.c +++ b/src/LYLeaks.c @@ -1090,26 +1090,10 @@ static char *LYLeakSAVsprintf(char **dest, mark_realloced(ALp_old, *dest, strlen(*dest) + 1, cp_File, ssi_Line); return (*dest); } - if (vp_realloced == vp_oldAlloced) { - ALp_new->SL_memory.cp_FileName = old_cp_File; - ALp_new->SL_memory.ssi_LineNumber = old_ssi_Line; - ALp_new->SL_realloc.cp_FileName = cp_File; - ALp_new->SL_realloc.ssi_LineNumber = ssi_Line; - return (*dest); - } - /* Look up again, list may have changed! - kw */ - ALp_old = FindInList(vp_oldAlloced); - if (ALp_old == NULL) { - ALp_new->SL_memory.cp_FileName = old_cp_File; - ALp_new->SL_memory.ssi_LineNumber = old_ssi_Line; - ALp_new->SL_realloc.cp_FileName = cp_File; - ALp_new->SL_realloc.ssi_LineNumber = ssi_Line; - } else { - ALp_new->SL_memory.cp_FileName = old_cp_File; - ALp_new->SL_memory.ssi_LineNumber = old_ssi_Line; - ALp_new->SL_realloc.cp_FileName = cp_File; - ALp_new->SL_realloc.ssi_LineNumber = ssi_Line; - } + ALp_new->SL_memory.cp_FileName = old_cp_File; + ALp_new->SL_memory.ssi_LineNumber = old_ssi_Line; + ALp_new->SL_realloc.cp_FileName = cp_File; + ALp_new->SL_realloc.ssi_LineNumber = ssi_Line; } return (*dest); }