mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 23:34:31 +04:00
unzip: add valid patche headers and missing CVE informations
This commit adds a valid git patch header for each patch, so that additional information can be stored. This is in this case and 'CVE:' tag. This can be used by CVE scanner to find out if the patch fixes a CVE. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
committed by
Florian Eckert
parent
5237ebf95e
commit
f9e7e2db94
@@ -0,0 +1,34 @@
|
||||
From 673c5b95e5ead5b83cb81b208fe13a5352ccdafc Mon Sep 17 00:00:00 2001
|
||||
From: OpenWrt community <openwrt-devel@lists.openwrt.org>
|
||||
Date: Mon, 30 Oct 2023 14:51:36 +0100
|
||||
Subject: [PATCH] fix: error to prevent unsigned overflow
|
||||
|
||||
---
|
||||
extract.c | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/extract.c b/extract.c
|
||||
index ad8b3f7..17b201f 100644
|
||||
--- a/extract.c
|
||||
+++ b/extract.c
|
||||
@@ -1257,8 +1257,17 @@ static int extract_or_test_entrylist(__G__ numchunk,
|
||||
if (G.lrec.compression_method == STORED) {
|
||||
zusz_t csiz_decrypted = G.lrec.csize;
|
||||
|
||||
- if (G.pInfo->encrypted)
|
||||
+ if (G.pInfo->encrypted) {
|
||||
+ if (csiz_decrypted <= 12) {
|
||||
+ /* handle the error now to prevent unsigned overflow */
|
||||
+ Info(slide, 0x401, ((char *)slide,
|
||||
+ LoadFarStringSmall(ErrUnzipNoFile),
|
||||
+ LoadFarString(InvalidComprData),
|
||||
+ LoadFarStringSmall2(Inflate)));
|
||||
+ return PK_ERR;
|
||||
+ }
|
||||
csiz_decrypted -= 12;
|
||||
+ }
|
||||
if (G.lrec.ucsize != csiz_decrypted) {
|
||||
Info(slide, 0x401, ((char *)slide,
|
||||
LoadFarStringSmall2(WrnStorUCSizCSizDiff),
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user