Bug#749164: Unchecked conversion from double to enum

Michael Tautschnig mt at debian.org
Sat May 24 16:07:38 UTC 2014


Package: libav
Version: 6:10.1-1
Usertags: goto-cc

During a rebuild of all packages in a clean sid chroot (and cowbuilder+pbuilder)
the build failed with the following error. Please note that we use our research
compiler tool-chain (using tools from the cbmc package), which permits extended
reporting on type inconsistencies at link time.

[...]
gcc -I. -I/srv/jenkins-slave/workspace/sid-goto-cc-libav/libav-10.1 -D_FORTIFY_SOURCE=2 -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DHAVE_AV_CONFIG_H -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security   -std=c99 -fomit-frame-pointer -pthread -I/usr/include/p11-kit-1 -I/usr/include/freetype2 -I/usr/include/opencv -I/usr/include/opus -D_REENTRANT -I/usr/include/p11-kit-1 -I/usr/include/schroedinger-1.0 -I/usr/include/orc-0.4 -g -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=declaration-after-statement -Werror=vla -Wno-maybe-uninitialized  -MMD -MF libavfilter/vf_select.d -MT libavfilter/vf_select.o -c -o libavfilter/vf_select.o /srv/jenkins-slave/workspace/sid-goto-cc-libav/libav-10.1/libavfilter/vf_select.c
file /srv/jenkins-slave/workspace/sid-goto-cc-libav/libav-10.1/libavfilter/vf_select.c line 218 function select_frame: in expression `select->var_values[(signed long int)12]':
conversion from `double' to `int': implicit conversion not permitted
CONVERSION ERROR
make[1]: *** [libavfilter/vf_select.o] Error 64
make[1]: *** Waiting for unfinished jobs....

Given that av_get_picture_type_char requires an enum argument:

http://sources.debian.net/src/libav/6:10.1-1/libavutil/avutil.h?hl=269#L269

ideally an explicit conversion with suitable checks on values should be
performed here:

http://sources.debian.net/src/libav/6:10.1-1/libavfilter/vf_select.c?hl=218#L218

But looking a few lines above at least an explicit (int) type cast would be in
line with the remainder of the code.

Best,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 859 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/attachments/20140524/b10265fe/attachment.sig>


More information about the pkg-multimedia-maintainers mailing list