diff -Nru freexl-1.0.2/configure freexl-1.0.3/configure --- freexl-1.0.2/configure 2015-07-14 07:45:23.000000000 +0000 +++ freexl-1.0.3/configure 2017-07-22 13:06:03.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for FreeXL 1.0.2. +# Generated by GNU Autoconf 2.69 for FreeXL 1.0.3. # # Report bugs to . # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='FreeXL' PACKAGE_TARNAME='freexl' -PACKAGE_VERSION='1.0.2' -PACKAGE_STRING='FreeXL 1.0.2' +PACKAGE_VERSION='1.0.3' +PACKAGE_STRING='FreeXL 1.0.3' PACKAGE_BUGREPORT='a.furieri@lqt.it' PACKAGE_URL='' @@ -1326,7 +1326,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 FreeXL 1.0.2 to adapt to many kinds of systems. +\`configure' configures FreeXL 1.0.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1396,7 +1396,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of FreeXL 1.0.2:";; + short | recursive ) echo "Configuration of FreeXL 1.0.3:";; esac cat <<\_ACEOF @@ -1508,7 +1508,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -FreeXL configure 1.0.2 +FreeXL configure 1.0.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2052,7 +2052,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by FreeXL $as_me 1.0.2, which was +It was created by FreeXL $as_me 1.0.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2923,7 +2923,7 @@ # Define the identity of the package. PACKAGE='freexl' - VERSION='1.0.2' + VERSION='1.0.3' cat >>confdefs.h <<_ACEOF @@ -17813,7 +17813,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by FreeXL $as_me 1.0.2, which was +This file was extended by FreeXL $as_me 1.0.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17879,7 +17879,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -FreeXL config.status 1.0.2 +FreeXL config.status 1.0.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru freexl-1.0.2/configure.ac freexl-1.0.3/configure.ac --- freexl-1.0.2/configure.ac 2015-07-14 07:45:23.000000000 +0000 +++ freexl-1.0.3/configure.ac 2017-07-22 13:05:23.000000000 +0000 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT(FreeXL, 1.0.2, a.furieri@lqt.it) +AC_INIT(FreeXL, 1.0.3, a.furieri@lqt.it) AC_LANG(C) AC_CONFIG_AUX_DIR([.]) AC_CONFIG_MACRO_DIR([m4]) diff -Nru freexl-1.0.2/debian/changelog freexl-1.0.3/debian/changelog --- freexl-1.0.2/debian/changelog 2016-05-01 01:11:00.000000000 +0000 +++ freexl-1.0.3/debian/changelog 2017-07-23 09:47:44.000000000 +0000 @@ -1,3 +1,12 @@ +freexl (1.0.3-1) unstable; urgency=medium + + * New upstream release. + * Bump Standards-Version to 4.0.0, no changes. + * Add autopkgtest to test installability. + * Use pkg-info.mk variables instead of dpkg-parsechangelog output. + + -- Bas Couwenberg Sun, 23 Jul 2017 11:47:44 +0200 + freexl (1.0.2-2) unstable; urgency=medium * Update Vcs-* URLs to use HTTPS. diff -Nru freexl-1.0.2/debian/control freexl-1.0.3/debian/control --- freexl-1.0.2/debian/control 2016-04-15 15:15:12.000000000 +0000 +++ freexl-1.0.3/debian/control 2017-07-23 09:44:12.000000000 +0000 @@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 9~), autotools-dev, dh-autoreconf -Standards-Version: 3.9.8 +Standards-Version: 4.0.0 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-grass/freexl.git Vcs-Git: https://anonscm.debian.org/git/pkg-grass/freexl.git Homepage: https://www.gaia-gis.it/fossil/freexl/ diff -Nru freexl-1.0.2/debian/rules freexl-1.0.3/debian/rules --- freexl-1.0.2/debian/rules 2016-05-01 01:09:50.000000000 +0000 +++ freexl-1.0.3/debian/rules 2017-07-23 09:47:41.000000000 +0000 @@ -10,7 +10,9 @@ # Verbose test output export VERBOSE=1 -UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p' | sed -e 's/\+.*//; s/^[0-9]://') +include /usr/share/dpkg/pkg-info.mk + +UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//') %: dh $@ --with autoreconf --parallel diff -Nru freexl-1.0.2/debian/tests/control freexl-1.0.3/debian/tests/control --- freexl-1.0.2/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ freexl-1.0.3/debian/tests/control 2017-07-23 09:44:30.000000000 +0000 @@ -0,0 +1,3 @@ +# Test installability +Depends: @ +Test-Command: /bin/true diff -Nru freexl-1.0.2/headers/freexl_internals.h freexl-1.0.3/headers/freexl_internals.h --- freexl-1.0.2/headers/freexl_internals.h 2015-07-14 07:45:23.000000000 +0000 +++ freexl-1.0.3/headers/freexl_internals.h 2017-07-22 11:46:08.000000000 +0000 @@ -171,6 +171,7 @@ unsigned int current_utf16_len; /* current UTF-16 length */ unsigned int current_utf16_off; /* current UTF-16 offset */ unsigned int current_utf16_skip; /* bytes to be skipped after the current string */ + unsigned int next_utf16_skip; /* remaining bytes to be skipped in the next record */ } biff_string_table; typedef struct biff_cell_value_struct diff -Nru freexl-1.0.2/Makefile.in freexl-1.0.3/Makefile.in --- freexl-1.0.2/Makefile.in 2015-07-14 07:45:23.000000000 +0000 +++ freexl-1.0.3/Makefile.in 2017-07-22 13:06:04.000000000 +0000 @@ -624,7 +624,7 @@ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -650,7 +650,7 @@ @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip @@ -667,7 +667,7 @@ distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -677,7 +677,7 @@ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac diff -Nru freexl-1.0.2/src/freexl.c freexl-1.0.3/src/freexl.c --- freexl-1.0.2/src/freexl.c 2015-07-14 07:45:23.000000000 +0000 +++ freexl-1.0.3/src/freexl.c 2017-07-22 13:02:03.000000000 +0000 @@ -339,15 +339,7 @@ *real_utf16 = 1; else *real_utf16 = 0; - if ((mask & 0x04) == 0x04) - { - /* optional field: 32-bits */ - memcpy (word32.bytes, p_string, 2); - if (swap) - swap32 (&word32); - skip_1 = word32.value; - p_string += 4; - } + if ((mask & 0x08) == 0x08) { /* optional field 16-bits */ @@ -357,6 +349,15 @@ skip_2 = word16.value; p_string += 2; } + if ((mask & 0x04) == 0x04) + { + /* optional field: 32-bits */ + memcpy (word32.bytes, p_string, 4); + if (swap) + swap32 (&word32); + skip_1 = word32.value; + p_string += 4; + } *start_offset = p_string - addr; *extra_skip = skip_1 + (skip_2 * 4); } @@ -1228,6 +1229,7 @@ workbook->shared_strings.current_utf16_len = 0; workbook->shared_strings.current_utf16_off = 0; workbook->shared_strings.current_utf16_skip = 0; + workbook->shared_strings.next_utf16_skip = 0; workbook->first_sheet = NULL; workbook->last_sheet = NULL; workbook->active_sheet = NULL; @@ -1758,6 +1760,7 @@ unsigned int len; int utf16 = 0; int err; + unsigned int next_skip; unsigned int utf16_len = workbook->shared_strings.current_utf16_len; unsigned int utf16_off = workbook->shared_strings.current_utf16_off; unsigned int utf16_skip = workbook->shared_strings.current_utf16_skip; @@ -1795,6 +1798,11 @@ /* skipping extra data (if any) */ p_string += utf16_skip; + if (p_string - workbook->record >= workbook->record_size) + next_skip = + (p_string - workbook->record) - workbook->record_size; + else + next_skip = 0; /* converting text to UTF-8 */ utf8_string = @@ -1808,7 +1816,8 @@ workbook->shared_strings.current_utf16_buf = NULL; workbook->shared_strings.current_utf16_len = 0; workbook->shared_strings.current_utf16_off = 0; - workbook->shared_strings.current_utf16_skip = 0; + workbook->shared_strings.current_utf16_skip = next_skip; + workbook->shared_strings.next_utf16_skip = 0; workbook->shared_strings.current_index += 1; } } @@ -1823,6 +1832,7 @@ biff_word16 word16; unsigned int start_offset; unsigned int extra_skip; + unsigned int next_skip; if ((unsigned int) (p_string - workbook->record) >= workbook->record_size) @@ -1831,6 +1841,9 @@ return FREEXL_OK; } + /* skipping extra bytes belonging to the previous record */ + p_string += workbook->shared_strings.next_utf16_skip; + memcpy (word16.bytes, p_string, 2); if (swap) swap16 (&word16); @@ -1843,6 +1856,7 @@ /* initializing the current UTF-16 variables */ workbook->shared_strings.current_utf16_skip = extra_skip; + workbook->shared_strings.next_utf16_skip = 0; workbook->shared_strings.current_utf16_off = 0; workbook->shared_strings.current_utf16_len = len; workbook->shared_strings.current_utf16_buf = @@ -1890,6 +1904,10 @@ p_string += len * 2; /* skipping extra data (if any) */ p_string += workbook->shared_strings.current_utf16_skip; + if (p_string - workbook->record >= workbook->record_size) + next_skip = (p_string - workbook->record) - workbook->record_size; + else + next_skip = 0; *(workbook->shared_strings.utf8_strings + i_string) = utf8_string; free (workbook->shared_strings.current_utf16_buf); @@ -1897,6 +1915,7 @@ workbook->shared_strings.current_utf16_len = 0; workbook->shared_strings.current_utf16_off = 0; workbook->shared_strings.current_utf16_skip = 0; + workbook->shared_strings.next_utf16_skip = next_skip; workbook->shared_strings.current_index = i_string + 1; } @@ -2395,7 +2414,7 @@ { /* XF [Extended Format] marker found */ unsigned char format; - unsigned short s_format; + unsigned short s_format = 0; if (fread (workbook->record, 1, record_size.value, workbook->xls) != record_size.value) @@ -3209,7 +3228,7 @@ || workbook->biff_version == FREEXL_BIFF_VER_8)) { /* XF [Extended Format] marker found */ - unsigned short s_format; + unsigned short s_format = 0; biff_word16 word16; if (workbook->second_pass) return FREEXL_OK;