LINUX.ORG.RU

История изменений

Исправление imul, (текущая версия) :

Фрагмент из выхлопа статического анализатора:
185/259 files checked 61% done
Checking bash-5.0/lib/sh/snprintf.c ...
Checking bash-5.0/lib/sh/snprintf.c: DEBUG;MACOSX...
Checking bash-5.0/lib/sh/snprintf.c: DRIVER...
[bash-5.0/lib/sh/snprintf.c:1859]: (error) Null pointer dereference
[bash-5.0/lib/sh/snprintf.c:1738]: (error) va_list 'args' used before va_start() was called.
[bash-5.0/lib/sh/snprintf.c:1788]: (error) va_list 'args' used before va_start() was called.
[bash-5.0/lib/sh/snprintf.c:1790]: (error) va_list 'args' used before va_start() was called.
[bash-5.0/lib/sh/snprintf.c:1792]: (error) va_list 'args' used before va_start() was called.
Checking bash-5.0/lib/sh/snprintf.c: DRIVER;HAVE_ASPRINTF=0;HAVE_SNPRINTF=0...
Checking bash-5.0/lib/sh/snprintf.c: DRIVER;HAVE_CONFIG_H...
Checking bash-5.0/lib/sh/snprintf.c: DRIVER;HAVE_CONFIG_H;__linux__...
Checking bash-5.0/lib/sh/snprintf.c: HANDLE_MULTIBYTE;HAVE_ASPRINTF=0;HAVE_SNPRINTF=0...
[bash-5.0/lib/sh/snprintf.c:945]: (error) Memory leak: lbuf
Checking bash-5.0/lib/sh/snprintf.c: HAVE_ASPRINTF=0;HAVE_ASPRINTF=0;HAVE_SNPRINTF=0...
Checking bash-5.0/lib/sh/snprintf.c: HAVE_ASPRINTF=0;HAVE_ASPRINTF=0;HAVE_SNPRINTF=0;__STDC__...
Checking bash-5.0/lib/sh/snprintf.c: HAVE_ASPRINTF=0;HAVE_SNPRINTF=0...
Checking bash-5.0/lib/sh/snprintf.c: HAVE_ASPRINTF=0;HAVE_SNPRINTF=0;HAVE_LOCALECONV...
Checking bash-5.0/lib/sh/snprintf.c: HAVE_ASPRINTF=0;HAVE_SNPRINTF=0;HAVE_MEMMOVE...
186/259 files checked 63% done

PS: сам код не смотрел. Возможно авторы и сами код тоже по трезвому не смотрят.

Исходная версия imul, :

Фрагмент из выхлопа статического анализатора:
185/259 files checked 61% done
Checking bash-5.0/lib/sh/snprintf.c ...
Checking bash-5.0/lib/sh/snprintf.c: DEBUG;MACOSX...
Checking bash-5.0/lib/sh/snprintf.c: DRIVER...
[bash-5.0/lib/sh/snprintf.c:1859]: (error) Null pointer dereference
[bash-5.0/lib/sh/snprintf.c:1738]: (error) va_list 'args' used before va_start() was called.
[bash-5.0/lib/sh/snprintf.c:1788]: (error) va_list 'args' used before va_start() was called.
[bash-5.0/lib/sh/snprintf.c:1790]: (error) va_list 'args' used before va_start() was called.
[bash-5.0/lib/sh/snprintf.c:1792]: (error) va_list 'args' used before va_start() was called.
Checking bash-5.0/lib/sh/snprintf.c: DRIVER;HAVE_ASPRINTF=0;HAVE_SNPRINTF=0...
Checking bash-5.0/lib/sh/snprintf.c: DRIVER;HAVE_CONFIG_H...
Checking bash-5.0/lib/sh/snprintf.c: DRIVER;HAVE_CONFIG_H;__linux__...
Checking bash-5.0/lib/sh/snprintf.c: HANDLE_MULTIBYTE;HAVE_ASPRINTF=0;HAVE_SNPRINTF=0...
[bash-5.0/lib/sh/snprintf.c:945]: (error) Memory leak: lbuf
Checking bash-5.0/lib/sh/snprintf.c: HAVE_ASPRINTF=0;HAVE_ASPRINTF=0;HAVE_SNPRINTF=0...
Checking bash-5.0/lib/sh/snprintf.c: HAVE_ASPRINTF=0;HAVE_ASPRINTF=0;HAVE_SNPRINTF=0;__STDC__...
Checking bash-5.0/lib/sh/snprintf.c: HAVE_ASPRINTF=0;HAVE_SNPRINTF=0...
Checking bash-5.0/lib/sh/snprintf.c: HAVE_ASPRINTF=0;HAVE_SNPRINTF=0;HAVE_LOCALECONV...
Checking bash-5.0/lib/sh/snprintf.c: HAVE_ASPRINTF=0;HAVE_SNPRINTF=0;HAVE_MEMMOVE...
186/259 files checked 63% done