Hello community,

here is the log from the commit of package libxls for openSUSE:Factory checked 
in at 2020-08-28 23:45:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libxls (Old)
 and      /work/SRC/openSUSE:Factory/.libxls.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libxls"

Fri Aug 28 23:45:14 2020 rev:2 rq:829633 version:1.5.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/libxls/libxls.changes    2019-12-07 
15:07:08.947865850 +0100
+++ /work/SRC/openSUSE:Factory/.libxls.new.3399/libxls.changes  2020-08-28 
23:45:17.379489815 +0200
@@ -1,0 +2,9 @@
+Tue Aug 25 15:54:47 UTC 2020 - Dirk Mueller <[email protected]>
+
+- update to 1.5.3:
+  * Allow truncated XLS files
+  * Fix long-standing "extra column" bug #73
+  * Support for RSTRING records (rich-text cells in older
+    BIFF5 files) tidyverse/readxl#611 
+
+-------------------------------------------------------------------

Old:
----
  libxls-1.5.2.tar.gz

New:
----
  libxls-1.5.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libxls.spec ++++++
--- /var/tmp/diff_new_pack.yHT0l0/_old  2020-08-28 23:45:18.111489346 +0200
+++ /var/tmp/diff_new_pack.yHT0l0/_new  2020-08-28 23:45:18.111489346 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libxls
 #
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 Name:           libxls
 %define lname libxlsreader1
-Version:        1.5.2
+Version:        1.5.3
 Release:        0
 Summary:        Library for Parsing Excel (XLS) Files
 License:        BSD-2-Clause
@@ -61,7 +61,7 @@
 
 %build
 %configure --disable-static
-make %{?_smp_mflags}
+%make_build
 
 %install
 %make_install

++++++ libxls-1.5.2.tar.gz -> libxls-1.5.3.tar.gz ++++++
Binary files old/libxls-1.5.2/._compile and new/libxls-1.5.3/._compile differ
Binary files old/libxls-1.5.2/._config.guess and 
new/libxls-1.5.3/._config.guess differ
Binary files old/libxls-1.5.2/._config.sub and new/libxls-1.5.3/._config.sub 
differ
Binary files old/libxls-1.5.2/._depcomp and new/libxls-1.5.3/._depcomp differ
Binary files old/libxls-1.5.2/._install-sh and new/libxls-1.5.3/._install-sh 
differ
Binary files old/libxls-1.5.2/._ltmain.sh and new/libxls-1.5.3/._ltmain.sh 
differ
Binary files old/libxls-1.5.2/._missing and new/libxls-1.5.3/._missing differ
Binary files old/libxls-1.5.2/._test-driver and new/libxls-1.5.3/._test-driver 
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libxls-1.5.2/README.md new/libxls-1.5.3/README.md
--- old/libxls-1.5.2/README.md  2019-09-19 02:43:03.000000000 +0200
+++ new/libxls-1.5.3/README.md  2020-06-11 16:16:41.000000000 +0200
@@ -30,7 +30,7 @@
 
 The [C API](include/xls.h) is pretty simple, this will get you started:
 
-```{C}
+```c
 xls_error_t error = LIBXLS_OK;
 xlsWorkBook *wb = xls_open_file("/path/to/finances.xls", "UTF-8", &error);
 if (wb == NULL) {
@@ -38,7 +38,7 @@
     exit(1);
 }
 for (int i=0; i<wb->sheets.count; i++) { // sheets
-    xl_WorkSheet *work_sheet = xls_getWorkSheet(work_book, i);
+    xlsWorkSheet *work_sheet = xls_getWorkSheet(work_book, i);
     error = xls_parseWorkSheet(work_sheet);
     for (int j=0; j<=work_sheet->rows.lastrow; j++) { // rows
         xlsRow *row = xls_row(work_sheet, j);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libxls-1.5.2/configure new/libxls-1.5.3/configure
--- old/libxls-1.5.2/configure  2019-10-27 15:27:46.000000000 +0100
+++ new/libxls-1.5.3/configure  2020-06-20 13:42:25.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libxls 1.5.2.
+# Generated by GNU Autoconf 2.69 for libxls 1.5.3.
 #
 # Report bugs to <[email protected]>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='libxls'
 PACKAGE_TARNAME='libxls'
-PACKAGE_VERSION='1.5.2'
-PACKAGE_STRING='libxls 1.5.2'
+PACKAGE_VERSION='1.5.3'
+PACKAGE_STRING='libxls 1.5.3'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL='https://github.com/libxls/libxls'
 
@@ -1346,7 +1346,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libxls 1.5.2 to adapt to many kinds of systems.
+\`configure' configures libxls 1.5.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1416,7 +1416,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libxls 1.5.2:";;
+     short | recursive ) echo "Configuration of libxls 1.5.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1539,7 +1539,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libxls configure 1.5.2
+libxls configure 1.5.3
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2083,7 +2083,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libxls $as_me 1.5.2, which was
+It was created by libxls $as_me 1.5.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2435,7 +2435,7 @@
 
 LIBXLS_MAJOR_VERSION=1
 LIBXLS_MINOR_VERSION=5
-LIBXLS_MICRO_VERSION=2
+LIBXLS_MICRO_VERSION=3
 
 VERSION=$LIBXLS_MAJOR_VERSION.$LIBXLS_MINOR_VERSION.$LIBXLS_MICRO_VERSION
 VERSION_INFO=`expr $LIBXLS_MAJOR_VERSION + 
$LIBXLS_MINOR_VERSION`:$LIBXLS_MICRO_VERSION:$LIBXLS_MINOR_VERSION
@@ -2977,7 +2977,7 @@
 
 # Define the identity of the package.
  PACKAGE='libxls'
- VERSION='1.5.2'
+ VERSION='1.5.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -19623,7 +19623,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libxls $as_me 1.5.2, which was
+This file was extended by libxls $as_me 1.5.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -19690,7 +19690,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libxls config.status 1.5.2
+libxls config.status 1.5.3
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libxls-1.5.2/configure.ac 
new/libxls-1.5.3/configure.ac
--- old/libxls-1.5.2/configure.ac       2019-10-27 15:26:41.000000000 +0100
+++ new/libxls-1.5.3/configure.ac       2020-06-20 13:42:08.000000000 +0200
@@ -1,9 +1,9 @@
-AC_INIT([libxls],[1.5.2],[[email protected]], [libxls], 
[https://github.com/libxls/libxls])
+AC_INIT([libxls],[1.5.3],[[email protected]], [libxls], 
[https://github.com/libxls/libxls])
 AC_CONFIG_SRCDIR([test/test.c])
 
 LIBXLS_MAJOR_VERSION=1
 LIBXLS_MINOR_VERSION=5
-LIBXLS_MICRO_VERSION=2
+LIBXLS_MICRO_VERSION=3
 
 VERSION=$LIBXLS_MAJOR_VERSION.$LIBXLS_MINOR_VERSION.$LIBXLS_MICRO_VERSION
 VERSION_INFO=`expr $LIBXLS_MAJOR_VERSION + 
$LIBXLS_MINOR_VERSION`:$LIBXLS_MICRO_VERSION:$LIBXLS_MINOR_VERSION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libxls-1.5.2/include/libxls/xlsstruct.h 
new/libxls-1.5.3/include/libxls/xlsstruct.h
--- old/libxls-1.5.2/include/libxls/xlsstruct.h 2019-02-10 18:19:57.000000000 
+0100
+++ new/libxls-1.5.3/include/libxls/xlsstruct.h 2020-06-12 20:18:12.000000000 
+0200
@@ -53,6 +53,7 @@
 #define XLS_RECORD_PALETTE      0x0092
 #define XLS_RECORD_MULRK        0x00BD
 #define XLS_RECORD_MULBLANK     0x00BE
+#define XLS_RECORD_RSTRING      0x00D6
 #define XLS_RECORD_DBCELL       0x00D7
 #define XLS_RECORD_XF           0x00E0
 #define XLS_RECORD_MSODRAWINGGROUP   0x00EB
@@ -133,8 +134,8 @@
 typedef struct ROW
 {
     WORD       index;
-    WORD       fcell;
-    WORD       lcell;
+    WORD       fcell; // first cell, 0-indexed
+    WORD       lcell; // last cell, 1-indexed
     WORD       height;
     WORD       notused;
     WORD       notused2; //used only for BIFF3-4
@@ -227,7 +228,6 @@
     BYTE       value[1]; // var
 }
 LABEL;
-typedef LABEL LABELSST;
 
 typedef struct BOOLERR
 {
Binary files old/libxls-1.5.2/src/._endian.c and 
new/libxls-1.5.3/src/._endian.c differ
Binary files old/libxls-1.5.2/src/._ole.c and new/libxls-1.5.3/src/._ole.c 
differ
Binary files old/libxls-1.5.2/src/._xls.c and new/libxls-1.5.3/src/._xls.c 
differ
Binary files old/libxls-1.5.2/src/._xlstool.c and 
new/libxls-1.5.3/src/._xlstool.c differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libxls-1.5.2/src/ole.c new/libxls-1.5.3/src/ole.c
--- old/libxls-1.5.2/src/ole.c  2019-02-10 18:19:57.000000000 +0100
+++ new/libxls-1.5.3/src/ole.c  2020-06-12 20:18:12.000000000 +0200
@@ -111,6 +111,11 @@
 {
        BYTE *ptr;
 
+#ifdef OLE_DEBUG
+    fprintf(stderr, "----------------------------------------------\n");
+    fprintf(stderr, "ole2_bufread (start)\n");
+#endif
+
     if (olest == NULL || olest->ole == NULL)
         return -1;
 
@@ -153,6 +158,10 @@
                        olest->cfat++;
                }
     }
+#ifdef OLE_DEBUG
+    fprintf(stderr, "----------------------------------------------\n");
+    fprintf(stderr, "ole2_bufread (end)\n");
+#endif
        // else printf("ENDOFCHAIN!!!\n");
     return 0;
 }
@@ -368,16 +377,23 @@
     return 0;
 }
 
+// Will read up to `size' bytes from the input, and pad the rest of `size' with
+// zeros if the input file or buffer is short.
 static size_t ole2_fread(OLE2 *ole2, void *buffer, size_t buffer_len, size_t 
size) {
     if (size > buffer_len)
         return 0;
 
+    memset(buffer, 0, size);
+
     if (ole2->file)
-        return fread(buffer, size, 1, ole2->file);
+        return fread(buffer, 1, size, ole2->file) > 0;
 
-    if (ole2->buffer_pos + size > ole2->buffer_len)
+    if (ole2->buffer_pos >= ole2->buffer_len)
         return 0;
 
+    if (ole2->buffer_pos + size > ole2->buffer_len)
+        size = ole2->buffer_len - ole2->buffer_pos;
+
     memcpy(buffer, (const char *)ole2->buffer + ole2->buffer_pos, size);
     ole2->buffer_pos += size;
 
@@ -485,7 +501,9 @@
         {
 
 #ifdef OLE_DEBUG               
-                       fprintf(stderr, "OLE TYPE: %s file=%d \n", pss->type == 
PS_USER_ROOT ? "root" : "user", (int)ole->files.count);
+                       fprintf(stderr, "OLE TYPE: %s file=%d size=%d\n",
+                    pss->type == PS_USER_ROOT ? "root" : "user",
+                    (int)ole->files.count, (int)pss->size);
 #endif         
             ole->files.file = 
realloc(ole->files.file,(ole->files.count+1)*sizeof(struct st_olefiles_data));
             ole->files.file[ole->files.count].name=name;
@@ -493,31 +511,35 @@
             ole->files.file[ole->files.count].size=pss->size;
             ole->files.count++;
                        
+#ifdef OLE_DEBUG
+            fprintf(stderr, 
"----------------------------------------------\n");
+            fprintf(stderr, "name: %s (size=%d [c=%c])\n", name, pss->bsize, 
name ? name[0]:' ');
+            fprintf(stderr, "bsize %i\n",pss->bsize);
+            fprintf(stderr, "type %i\n",pss->type);
+            fprintf(stderr, "flag %i\n",pss->flag);
+            fprintf(stderr, "left %X\n",pss->left);
+            fprintf(stderr, "right %X\n",pss->right);
+            fprintf(stderr, "child %X\n",pss->child);
+            fprintf(stderr, "guid %.4X-%.4X-%.4X-%.4X %.4X-%.4X-%.4X-%.4X\n",
+                    pss->guid[0],pss->guid[1],pss->guid[2],pss->guid[3],
+                    pss->guid[4],pss->guid[5],pss->guid[6],pss->guid[7]);
+            fprintf(stderr, "user flag %.4X\n",pss->userflags);
+            fprintf(stderr, "sstart %.4d\n",pss->sstart);
+            fprintf(stderr, "size %.4d\n",pss->size);
+#endif
                        if(pss->sstart == ENDOFCHAIN) {
                                if (xls_debug) verbose("END OF CHAIN\n");
                        } else if(pss->type == PS_USER_STREAM) {
-#ifdef OLE_DEBUG
-                                       fprintf(stderr, 
"----------------------------------------------\n");
-                                       fprintf(stderr, "name: %s (size=%d 
[c=%c])\n", name, pss->bsize, name ? name[0]:' ');
-                                       fprintf(stderr, "bsize 
%i\n",pss->bsize);
-                                       fprintf(stderr, "type %i\n",pss->type);
-                                       fprintf(stderr, "flag %i\n",pss->flag);
-                                       fprintf(stderr, "left %X\n",pss->left);
-                                       fprintf(stderr, "right 
%X\n",pss->right);
-                                       fprintf(stderr, "child 
%X\n",pss->child);
-                                       fprintf(stderr, "guid 
%.4X-%.4X-%.4X-%.4X %.4X-%.4X-%.4X-%.4X\n",
-                            
pss->guid[0],pss->guid[1],pss->guid[2],pss->guid[3],
-                                               
pss->guid[4],pss->guid[5],pss->guid[6],pss->guid[7]);
-                                       fprintf(stderr, "user flag 
%.4X\n",pss->userflags);
-                                       fprintf(stderr, "sstart 
%.4d\n",pss->sstart);
-                                       fprintf(stderr, "size 
%.4d\n",pss->size);
-#endif
                        } else if(pss->type == PS_USER_ROOT) {
                                DWORD sector, k, blocks;
                                BYTE *wptr;
                 size_t bytes_left;
                                
                                blocks = (pss->size + (ole->lsector - 1)) / 
ole->lsector;       // count partial
+#ifdef OLE_DEBUG
+                fprintf(stderr, "OLE BLOCKS: %d = (%d + (%d - 1))/%d\n",
+                        (int)blocks, (int)pss->size, (int)ole->lsector, 
(int)ole->lsector);
+#endif
                                if ((ole->SSAT = ole_realloc(ole->SSAT, 
blocks*ole->lsector)) == NULL) {
                     total_bytes_read = -1;
                     goto cleanup;
@@ -556,6 +578,11 @@
     if (pss)
         free(pss);
 
+#ifdef OLE_DEBUG
+    fprintf(stderr, "----------------------------------------------\n");
+    fprintf(stderr, "ole2_read_body: %d bytes\n", (int)total_bytes_read);
+#endif
+
     return total_bytes_read;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libxls-1.5.2/src/xls.c new/libxls-1.5.3/src/xls.c
--- old/libxls-1.5.2/src/xls.c  2019-02-10 18:19:57.000000000 +0100
+++ new/libxls-1.5.3/src/xls.c  2020-06-12 20:18:12.000000000 +0200
@@ -469,7 +469,7 @@
     if (bof->id == XLS_RECORD_LABELSST)
         return (bof->size < offsetof(LABEL, value) + (pWB->is5ver ? 2 : 4));
 
-    if (bof->id == XLS_RECORD_LABEL) {
+    if (bof->id == XLS_RECORD_LABEL || bof->id == XLS_RECORD_RSTRING) {
         if (bof->size < offsetof(LABEL, value) + 2)
             return 1;
 
@@ -596,6 +596,7 @@
         break;
     case XLS_RECORD_LABELSST:
     case XLS_RECORD_LABEL:
+    case XLS_RECORD_RSTRING:
         xls_cell_set_str(cell, xls_getfcell(pWS->workbook, cell, 
((LABEL*)buf)->value));
         if (cell->str) {
             sscanf((char *)cell->str, "%d", &cell->l);
@@ -1124,8 +1125,9 @@
                 goto cleanup;
             }
             xlsConvertRow((ROW*)buf);
-            if (pWS->rows.lastcol<((ROW*)buf)->lcell)
-                pWS->rows.lastcol=((ROW*)buf)->lcell;
+            /* The lcell field is 1-indexed whereas lastcol is 0-indexed */
+            if (pWS->rows.lastcol+1<((ROW*)buf)->lcell)
+                pWS->rows.lastcol=((ROW*)buf)->lcell-1;
             if (pWS->rows.lastrow<((ROW*)buf)->index)
                 pWS->rows.lastrow=((ROW*)buf)->index;
             break;
@@ -1156,6 +1158,7 @@
         case XLS_RECORD_LABELSST:
         case XLS_RECORD_BLANK:
         case XLS_RECORD_LABEL:
+        case XLS_RECORD_RSTRING:
         case XLS_RECORD_FORMULA:
         case XLS_RECORD_FORMULA_ALT:
         case XLS_RECORD_BOOLERR:
@@ -1169,7 +1172,7 @@
                 pWS->rows.lastrow=xlsShortVal(((COL*)buf)->row);
             break;
         }
-        if (pWS->rows.lastcol > 256) {
+        if (pWS->rows.lastcol > 255) {
             retval = LIBXLS_ERROR_PARSE;
             goto cleanup;
         }
@@ -1342,6 +1345,7 @@
         case XLS_RECORD_LABELSST:
         case XLS_RECORD_BLANK:
         case XLS_RECORD_LABEL:
+        case XLS_RECORD_RSTRING:
         case XLS_RECORD_FORMULA:
         case XLS_RECORD_FORMULA_ALT:
             if ((cell = xls_addCell(pWS, &tmp, buf)) == NULL) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libxls-1.5.2/src/xlstool.c 
new/libxls-1.5.3/src/xlstool.c
--- old/libxls-1.5.2/src/xlstool.c      2019-10-10 12:54:07.000000000 +0200
+++ new/libxls-1.5.3/src/xlstool.c      2020-06-12 20:18:12.000000000 +0200
@@ -609,6 +609,7 @@
         ret = strdup("");
         break;
     case XLS_RECORD_LABEL:
+    case XLS_RECORD_RSTRING:
         len = label[0] + (label[1] << 8);
         label += 2;
                if(pWB->is5ver) {


Reply via email to