Compare commits

..

No commits in common. "factory" and "factory" have entirely different histories.

7 changed files with 63 additions and 22 deletions

View File

@ -0,0 +1,57 @@
From 866fedeae65ba9ff12b6cf4449dee2096bb2da51 Mon Sep 17 00:00:00 2001
From: stephematician <stephematician@gmail.com>
Date: Wed, 2 Mar 2022 15:01:51 +1100
Subject: [PATCH] Fixes #94 possible null ptr deref
Changes due to lockedbyte and PR 97 conversation
---
include/xls.h | 4 +++-
src/xls.c | 6 ++++++
2 files changed, 9 insertions(+), 1 deletion(-)
Index: libxls-1.6.2/include/xls.h
===================================================================
--- libxls-1.6.2.orig/include/xls.h
+++ libxls-1.6.2/include/xls.h
@@ -49,7 +49,9 @@ typedef enum {
LIBXLS_ERROR_SEEK,
LIBXLS_ERROR_READ,
LIBXLS_ERROR_PARSE,
- LIBXLS_ERROR_MALLOC
+ LIBXLS_ERROR_MALLOC,
+ LIBXLS_ERROR_UNSUPPORTED_ENCRYPTION,
+ LIBXLS_ERROR_NULL_ARGUMENT
} xls_error_t;
const char* xls_getVersion(void);
Index: libxls-1.6.2/src/xls.c
===================================================================
--- libxls-1.6.2.orig/src/xls.c
+++ libxls-1.6.2/src/xls.c
@@ -830,6 +830,8 @@ int xls_isRecordTooSmall(xlsWorkBook *pW
xls_error_t xls_parseWorkBook(xlsWorkBook* pWB)
{
+ if(!pWB) return LIBXLS_ERROR_NULL_ARGUMENT;
+
BOF bof1 = { .id = 0, .size = 0 };
BOF bof2 = { .id = 0, .size = 0 };
BYTE* buf = NULL;
@@ -1072,6 +1074,8 @@ cleanup:
static xls_error_t xls_preparseWorkSheet(xlsWorkSheet* pWS)
{
+ if(!pWS) return LIBXLS_ERROR_NULL_ARGUMENT;
+
BOF tmp;
BYTE* buf = NULL;
xls_error_t retval = LIBXLS_OK;
@@ -1221,6 +1225,8 @@ static xls_error_t xls_formatColumn(xlsW
xls_error_t xls_parseWorkSheet(xlsWorkSheet* pWS)
{
+ if(!pWS) return LIBXLS_ERROR_NULL_ARGUMENT;
+
BOF tmp;
BYTE* buf = NULL;
long offset = pWS->filepos;

View File

@ -1,4 +0,0 @@
mtime: 1735247335
commit: 23239e83c6b71cc8fd808bfe21fffcf044d31683d80eea40561877997408dad6
url: https://src.opensuse.org/clibs/libxls
revision: master

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b2d7c416a74ac757e3d0b5136282aaf5e81154ba212395a7b7f72b4cc0057c2a
size 256

3
libxls-1.6.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5dacc34d94bf2115926c80c6fb69e4e7bd2ed6403d51cff49041a94172f5e371
size 443736

BIN
libxls-1.6.3.tar.gz (Stored with Git LFS)

Binary file not shown.

View File

@ -1,13 +1,3 @@
-------------------------------------------------------------------
Thu Dec 26 20:34:32 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Update to release 1.6.3
* Fix style record size check on big-endian systems
* Fix header include in C++ mode
* Fix buffer overflows when parsing style records
* Fix infinite loop with self-referencing sectors
- Delete 0001-Fixes-94-possible-null-ptr-deref.patch (merged)
-------------------------------------------------------------------
Mon May 16 20:51:17 UTC 2022 - Jan Engelhardt <jengelh@inai.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package libxls
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -18,13 +18,14 @@
Name: libxls
%define lname libxlsreader8
Version: 1.6.3
Version: 1.6.2
Release: 0
Summary: Library for Parsing Excel (XLS) Files
License: BSD-2-Clause
Group: Development/Libraries/C and C++
URL: https://github.com/libxls/libxls
Source: https://github.com/libxls/libxls/releases/download/v%version/libxls-%version.tar.gz
Patch1: 0001-Fixes-94-possible-null-ptr-deref.patch
BuildRequires: pkg-config
%description