[freexl] 01/07: Imported Upstream version 1.0.0i
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Sat Mar 7 12:28:06 UTC 2015
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository freexl.
commit a6cb9c930c1a2d78ddb67008d9da3a97ccbd2d9e
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Sat Mar 7 12:59:42 2015 +0100
Imported Upstream version 1.0.0i
---
configure | 20 ++++++++++----------
configure.ac | 2 +-
src/freexl.c | 21 ++++++++++++++++++++-
3 files changed, 31 insertions(+), 12 deletions(-)
diff --git a/configure b/configure
index 44b5f23..91e18df 100755
--- a/configure
+++ b/configure
@@ -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.0h.
+# Generated by GNU Autoconf 2.69 for FreeXL 1.0.0i.
#
# Report bugs to <a.furieri at lqt.it>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='FreeXL'
PACKAGE_TARNAME='freexl'
-PACKAGE_VERSION='1.0.0h'
-PACKAGE_STRING='FreeXL 1.0.0h'
+PACKAGE_VERSION='1.0.0i'
+PACKAGE_STRING='FreeXL 1.0.0i'
PACKAGE_BUGREPORT='a.furieri at lqt.it'
PACKAGE_URL=''
@@ -1326,7 +1326,7 @@ if test "$ac_init_help" = "long"; then
# 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.0h to adapt to many kinds of systems.
+\`configure' configures FreeXL 1.0.0i to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1396,7 +1396,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of FreeXL 1.0.0h:";;
+ short | recursive ) echo "Configuration of FreeXL 1.0.0i:";;
esac
cat <<\_ACEOF
@@ -1508,7 +1508,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-FreeXL configure 1.0.0h
+FreeXL configure 1.0.0i
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2052,7 +2052,7 @@ cat >config.log <<_ACEOF
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.0h, which was
+It was created by FreeXL $as_me 1.0.0i, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2923,7 +2923,7 @@ fi
# Define the identity of the package.
PACKAGE='freexl'
- VERSION='1.0.0h'
+ VERSION='1.0.0i'
cat >>confdefs.h <<_ACEOF
@@ -17812,7 +17812,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# 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.0h, which was
+This file was extended by FreeXL $as_me 1.0.0i, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -17878,7 +17878,7 @@ _ACEOF
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.0h
+FreeXL config.status 1.0.0i
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 0687e47..6f4d3cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT(FreeXL, 1.0.0h, a.furieri at lqt.it)
+AC_INIT(FreeXL, 1.0.0i, a.furieri at lqt.it)
AC_LANG(C)
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_MACRO_DIR([m4])
diff --git a/src/freexl.c b/src/freexl.c
index c33e8fe..3bf4742 100644
--- a/src/freexl.c
+++ b/src/freexl.c
@@ -1068,6 +1068,11 @@ allocate_cells (biff_workbook * workbook)
unsigned int col;
biff_cell_value *p_cell;
+ if (workbook == NULL)
+ return FREEXL_NULL_ARGUMENT;
+ if (workbook->active_sheet == NULL)
+ return FREEXL_NULL_ARGUMENT;
+
/* allocating the cell values array */
workbook->active_sheet->cell_values =
malloc (sizeof (biff_cell_value) *
@@ -1713,6 +1718,11 @@ parse_SST (biff_workbook * workbook, int swap)
swap32 (&n_strings);
p_string = workbook->record + 8;
workbook->shared_strings.string_count = n_strings.value;
+ if (workbook->shared_strings.string_count > 1024 * 1024)
+ {
+ /* unexpected huge count ... cowardly giving up ... */
+ return FREEXL_INSUFFICIENT_MEMORY;
+ }
workbook->shared_strings.utf8_strings =
malloc (sizeof (char **) * workbook->shared_strings.string_count);
for (i_string = 0; i_string < workbook->shared_strings.string_count;
@@ -3749,6 +3759,8 @@ read_biff_next_record (biff_workbook * workbook, int swap, int *errcode)
unsigned int already_done;
unsigned int chunk =
workbook->sector_end - (workbook->p_in - workbook->sector_buf);
+ if (workbook->sector_end <= (workbook->p_in - workbook->sector_buf))
+ return -1;
memcpy (workbook->record, workbook->p_in, chunk);
workbook->p_in += chunk;
already_done = chunk;
@@ -3825,6 +3837,10 @@ read_mini_biff_next_record (biff_workbook * workbook, int swap, int *errcode)
workbook->record_type = record_type.value;
workbook->record_size = record_size.value;
+ if ((workbook->p_in - workbook->fat->miniStream) + workbook->record_size >
+ (int) workbook->size)
+ return 0; /* unexpected EOF */
+
memcpy (workbook->record, workbook->p_in, workbook->record_size);
workbook->p_in += record_size.value;
@@ -4062,7 +4078,10 @@ common_open (const char *path, const void **xls_handle, int magic)
p_sheet->columns += 1;
ret = allocate_cells (workbook);
if (ret != FREEXL_OK)
- return ret;
+ {
+ errcode = ret;
+ goto stop;
+ }
p_sheet->valid_dimension = 1;
workbook->second_pass = 1;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/freexl.git
More information about the Pkg-grass-devel
mailing list