view Makefile.am @ 91:23d412d59d62 src

Abort when PTT search table has zero entries The static analyzer from LLVM/Clang 1:3.4~svn194079-1 reports a possible allocation of size 0 in `libdvdread/src/ifo_read.c`. $ scan-build -o scan-build make $ scan-view scan-build/2013-11-18-155601-16168-1 When `vts_ptt_srpt->nr_of_srpts` is zero the allocation size is zero. vts_ptt_srpt->title = malloc(vts_ptt_srpt->nr_of_srpts * sizeof(ttu_t)); The manual of the function `malloc` writes the following. If size is 0, then malloc() returns either NULL, or a unique pointer value that can later be successfully passed to free(). So check for 0 and, if it is, abort by going to the label `fail`. Patch by Paul Menzel <paulepanter AT users DOT sourceforge DOT net>
author rathann
date Wed, 04 Dec 2013 22:40:17 +0000
parents c743d79f187b
children
line wrap: on
line source

include $(top_srcdir)/misc/Makefile.common

includedir = ${prefix}/include/dvdread

AM_CPPFLAGS = -I$(top_srcdir)/src

lib_LTLIBRARIES = libdvdread.la

libdvdread_la_SOURCES = dvd_reader.c nav_read.c ifo_read.c \
	dvd_input.c dvd_udf.c md5.c nav_print.c ifo_print.c bitreader.c \
	bswap.h dvd_input.h dvdread_internal.h dvd_udf.h md5.h bitreader.h

libdvdread_la_LIBADD = $(DYNAMIC_LD_LIBS)

libdvdread_la_LDFLAGS = -version-info $(DVDREAD_LT_CURRENT):$(DVDREAD_LT_REVISION):$(DVDREAD_LT_AGE) \
	-export-symbols-regex "(^dvd.*|^nav.*|^ifo.*|^DVD.*|^UDF.*)"

include_HEADERS = dvdread/dvd_reader.h dvdread/nav_read.h dvdread/ifo_read.h \
	dvdread/nav_print.h dvdread/ifo_print.h dvdread/ifo_types.h dvdread/nav_types.h dvdread/dvd_udf.h dvdread/bitreader.h