+++ /dev/null
-Plain English Copyright Notice
-
-This file is not intended to be the actual License. The reason this file
-exists is that we here are programmers and engineers. We aren't lawyers. We
-provide licenses that we THINK say the right things, but we have our own
-intentions at heart. This is a plain-english explanation of what those
-intentions are, and if you follow them you will be within the "spirit" of
-the license.
-
-The intent is for us to enjoy writing software that is useful to us (the
-AUTHORS) and allow others to use it freely and also benefit from the work we
-put into making it. We don't want to restrict others using it. They should
-not *HAVE* to make the source code of the applications they write that
-simply link to these libraries (be that statically or dynamically), or for
-them to be limited as to what license they choose to use (be it open, closed
-or anything else). But we would like to know you are using these libraries.
-We simply would like to know that it has been useful to someone. This is why
-we ask for acknowledgement of some sort.
-
-You can do what you want with the source of this software - it doesn't
-matter. We still have it here for ourselves and it is open and free to use
-and download and play with. It can't be taken away. We don't really mind what
-you do with the source to your software. We would simply like to know that
-you are using it - especially if it makes it to a commerical product. If you
-simply e-mail all the AUTHORS (see COPYING and AUTHORS files) telling us, and
-then make sure you include a paragraph or page in the manual for the product
-with the copyright notice and state that you used this software, we will be
-very happy. If you want to contribute back modifications and fixes you may have
-made we will welcome those too with open arms (generally). If you want help
-with changes needed, ports needed or features to be added, arrangements can
-be easily made with some dialogue.
-
-Carsten Haitzler <raster@rasterman.com>
2010-09-02 Cedric BAIL
* Fix bug of ever growing dictionnary and improve strcmp comparison.
+
+2010-11-12 Cedric BAIL
+
+ * Don't try to read broken file when open in READ_WRITE mode.
+
+2010-11-14 Cedric BAIL
+
+ * Fix bug with cypher and compression used together.
+
+2010-11-21 Carsten Haitzler (The Rasterman)
+
+ * Fix another bug related to cipher and compression (leak and
+ bad free)
+
aclocal.m4 \
compile \
config.guess \
-config.h.in \
-config.sub \
-configure \
+config.h.in \
+config.sub \
+configure \
depcomp \
install-sh \
-ltmain.sh \
-missing \
+ltmain.sh \
+missing \
$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \
$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 \
$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc.tar.bz2 \
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
-AC_INIT([eet], [v_ver.beta], [enlightenment-devel@lists.sourceforge.net])
+AC_INIT([eet], [v_ver.beta2], [enlightenment-devel@lists.sourceforge.net])
AC_PREREQ([2.52])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
+++ /dev/null
-dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
-dnl That code is public domain and can be freely used or copied.
-
-dnl Macro that check if several pthread library is available or not.
-
-dnl Usage: EFL_CHECK_PTHREAD(want_pthread_spin[, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Call AC_SUBST(EFL_PTHREAD_CFLAGS)
-dnl Call AC_SUBST(EFL_PTHREAD_LIBS)
-dnl Define EFL_HAVE_PTHREAD
-dnl Define EFL_HAVE_PTHREAD_SPINLOCK
-
-AC_DEFUN([EFL_CHECK_PTHREAD],
-[
-
-dnl configure option
-
-AC_ARG_ENABLE([pthread],
- [AC_HELP_STRING([--disable-pthread], [enable POSIX threads code @<:@default=auto@:>@])],
- [
- if test "x${enableval}" = "xyes" ; then
- _efl_enable_pthread="yes"
- else
- _efl_enable_pthread="no"
- fi
- ],
- [_efl_enable_pthread="auto"])
-
-AC_MSG_CHECKING([whether to build POSIX threads code])
-AC_MSG_RESULT([${_efl_enable_pthread}])
-
-dnl check if the compiler supports pthreads
-
-case "$host_os" in
- mingw*)
- _efl_pthread_cflags=""
- _efl_pthread_libs="-lpthreadGC2"
- ;;
- solaris*)
- _efl_pthread_cflags="-mt"
- _efl_pthread_libs="-mt"
- ;;
- *)
- _efl_pthread_cflags="-pthread"
- _efl_pthread_libs="-pthread"
- ;;
-esac
-
-_efl_have_pthread="no"
-
-if test "x${_efl_enable_pthread}" = "xyes" || test "x${_efl_enable_pthread}" = "xauto" ; then
-
- SAVE_CFLAGS=${CFLAGS}
- CFLAGS="${CFLAGS} ${_efl_pthread_cflags}"
- SAVE_LDFLAGS=${LDFLAGS}
- LDFLAGS="${LDFLAGS} ${_efl_pthread_libs}"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[
-#include <pthread.h>
- ]],
- [[
-pthread_t id;
-id = pthread_self();
- ]])],
- [_efl_have_pthread="yes"],
- [_efl_have_pthread="no"])
- CFLAGS=${SAVE_CFLAGS}
- LDFLAGS=${SAVE_LDFLAGS}
-
-fi
-
-AC_MSG_CHECKING([whether system support POSIX threads])
-AC_MSG_RESULT([${_efl_have_pthread}])
-if test "$x{_efl_enable_pthread}" = "xyes" && test "x${_efl_have_pthread}" = "xno"; then
- AC_MSG_ERROR([pthread support requested but not found.])
-fi
-
-EFL_PTHREAD_CFLAGS=""
-EFL_PTHREAD_LIBS=""
-if test "x${_efl_have_pthread}" = "xyes" ; then
- EFL_PTHREAD_CFLAGS=${_efl_pthread_cflags}
- EFL_PTHREAD_LIBS=${_efl_pthread_libs}
-fi
-
-AC_SUBST(EFL_PTHREAD_CFLAGS)
-AC_SUBST(EFL_PTHREAD_LIBS)
-
-if test "x${_efl_have_pthread}" = "xyes" ; then
- AC_DEFINE(EFL_HAVE_PTHREAD, 1, [Define to mention that POSIX threads are supported])
-fi
-
-dnl check if the compiler supports pthreads spinlock
-
-_efl_have_pthread_spinlock="no"
-
-if test "x${_efl_have_pthread}" = "xyes" && test "x$1" = "xyes" ; then
-
- SAVE_CFLAGS=${CFLAGS}
- CFLAGS="${CFLAGS} ${EFL_PTHREAD_CFLAGS}"
- SAVE_LDFLAGS=${LDFLAGS}
- LDFLAGS="${LDFLAGS} ${EFL_PTHREAD_LIBS}"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[
-#include <pthread.h>
- ]],
- [[
-pthread_spinlock_t lock;
-int res;
-res = pthread_spin_init(&lock, PTHREAD_PROCESS_PRIVATE);
- ]])],
- [_efl_have_pthread_spinlock="yes"],
- [_efl_have_pthread_spinlock="no"])
- CFLAGS=${SAVE_CFLAGS}
- LDFLAGS=${SAVE_LDFLAGS}
-
-fi
-
-AC_MSG_CHECKING([whether to build POSIX threads spinlock code])
-AC_MSG_RESULT([${_efl_have_pthread_spinlock}])
-if test "x${_efl_enable_pthread}" = "xyes" && test "x${_efl_have_pthread_spinlock}" = "xno" && test "x$1" = "xyes" ; then
- AC_MSG_WARN([pthread support requested but spinlocks are not supported])
-fi
-
-if test "x${_efl_have_pthread_spinlock}" = "xyes" ; then
- AC_DEFINE(EFL_HAVE_PTHREAD_SPINLOCK, 1, [Define to mention that POSIX threads spinlocks are supported])
-fi
-
-AS_IF([test "x$_efl_have_pthread" = "xyes"], [$2], [$3])
-AS_IF([test "x$_efl_have_pthread_spinlock" = "xyes"], [$4], [$5])
-
-])
mingw*)
;;
solaris*)
- _efl_thread_cflags="-mt"
- _efl_thread_libs="-mt"
+ _efl_threads_cflags="-mt"
+ _efl_threads_libs="-mt"
;;
*)
- _efl_thread_cflags="-pthread"
- _efl_thread_libs="-pthread"
+ _efl_threads_cflags="-pthread"
+ _efl_threads_libs="-pthread"
;;
esac
EFL_PTHREAD_CFLAGS=""
EFL_PTHREAD_LIBS=""
if test "x${_efl_have_posix_threads}" = "xyes" ; then
- EFL_PTHREAD_CFLAGS=${_efl_thread_cflags}
- EFL_PTHREAD_LIBS=${_efl_thread_libs}
+ EFL_PTHREAD_CFLAGS=${_efl_threads_cflags}
+ EFL_PTHREAD_LIBS=${_efl_threads_libs}
fi
AC_SUBST(EFL_PTHREAD_CFLAGS)
+++ /dev/null
-EFL:eet repo for SLP2
Eet_File_Mode mode);
/**
- * Open an eet file directly from a memory location. The data are not copied,
- * so you must keep them around as long as the eet file is open. Their is
- * currently no cache for this kind of Eet_File, so it's reopen every time
- * you do use eet_memopen_read.
+ * Open an eet file directly from a memory location. The data is not copied,
+ * so you must keep it around as long as the eet file is open. There is
+ * currently no cache for this kind of Eet_File, so it's reopened every time
+ * you use eet_memopen_read.
*
* @since 1.1.0
* @ingroup Eet_File_Group
if (dst)
{
memcpy(dst, data_ret, subsize);
- if (edd) edd->func.mem_free(data_ret);
+ if ((ede) && (ede->subtype))
+ ede->subtype->func.mem_free(data_ret);
+ else if (edd)
+ edd->func.mem_free(data_ret);
else free(data_ret);
_eet_freelist_del(context, data_ret);
}
{
fclose(fp);
fp = NULL;
+
+ memset(&file_stat, 0, sizeof(file_stat));
+
goto open_error;
}
- if ((mode == EET_FILE_MODE_READ) &&
- (file_stat.st_size < ((int)sizeof(int) * 3)))
+ if (file_stat.st_size < ((int)sizeof(int) * 3))
{
fclose(fp);
fp = NULL;
+
+ memset(&file_stat, 0, sizeof(file_stat));
+
goto open_error;
}
unsigned int data_deciphered_sz = 0;
/* if we already have the data in ram... copy that */
+ if (efn->ciphered && efn->size > size)
+ {
+ size = efn->size;
+ data = realloc(data, efn->size);
+ }
+
if (efn->data)
- memcpy(data, efn->data, efn->size);
+ memcpy(data, efn->data, size);
else
- if (!read_data_from_disk(ef, efn, data, size))
- goto on_error;
+ if (!read_data_from_disk(ef, efn, data, size))
+ goto on_error;
if (efn->ciphered && cipher_key)
{
- if (eet_decipher(data, size, cipher_key, strlen(cipher_key),
+ if (eet_decipher(data, efn->size, cipher_key, strlen(cipher_key),
&data_deciphered, &data_deciphered_sz))
{
if (data_deciphered)
/* compressed data */
else
{
- void *tmp_data;
+ void *tmp_data = NULL;
void *data_deciphered = NULL;
unsigned int data_deciphered_sz = 0;
int free_tmp = 0;
goto on_error;
}
- free(tmp_data);
+ if (free_tmp)
+ free(tmp_data);
+ free_tmp = 1;
tmp_data = data_deciphered;
compr_size = data_deciphered_sz;
}
dlen = size;
if (uncompress((Bytef *)data, &dlen,
tmp_data, (uLongf)compr_size))
- goto on_error;
+ {
+ if (free_tmp)
+ free(tmp_data);
+ goto on_error;
+ }
if (free_tmp)
free(tmp_data);
data2 = data_ciphered;
data_size = data_ciphered_sz;
- size = (data_size > size) ? data_size : size;
}
else
{
const char *choice;
const char *tmp;
+#ifdef EINA_DEFAULT_MEMPOOL
+ choice = "pass_through";
+#else
choice = "chained_mempool";
+#endif
tmp = getenv("EET_MEMPOOL");
if (tmp && tmp[0])
choice = tmp;
endif
-EXTRA_DIST = eet_suite.h
+EXTRA_DIST = eet_suite.h cert.pem key_enc_none.pem key_enc.pem key.pem