commit 1bee641ebecfca492d4b6e1d885259348dab5322
parent 874f7c08f758db93b4305bd0ea216d0b09fdc214
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 29 Jul 2026 23:54:50 +0200
fix (harmless) out-of-bounds read
Diffstat:
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/common/unzip.h b/src/common/unzip.h
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with libextractor; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Free Software Foundation, Inc., 51 Franlkin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
/**
diff --git a/src/plugins/deb_extractor.c b/src/plugins/deb_extractor.c
@@ -135,9 +135,11 @@ processControl (const char *data,
pos = 0;
while (pos < size)
{
- for (colon = pos; ':' != data[colon]; colon++)
- if ((colon > size) || ('\n' == data[colon]))
- return 0;
+ for (colon = pos; colon < size; colon++)
+ if ((':' == data[colon]) || ('\n' == data[colon]))
+ break;
+ if ((colon >= size) || (':' != data[colon]))
+ return 0;
colon++;
while ((colon < size) && (isspace ((unsigned char) data[colon])))
colon++;