Skip to content

Remaining stat analysis patches

Dmitry Rodionov requested to merge dkr/more-stat-analysis-patches into master

Summary

This is a port of new changes from !1077 (merged). I added some commits there for simplicity to avoid cherry picking back and forth. So now when all svace warnings are completed its time to do it properly. Merge these to master and then cherry pick back

  • chore: fix static overflow

An element of array 'nc->stack' of size 256, declared at lj_opt_narrow.c:367, is accessed by an index with possible value -1 at lj_opt_narrow.c:377. This may lead to a buffer overflow.

  • chore: fix deref of null in sqlVXPrintf

After having been assigned to a NULL value at printf.c:219, pointer 'bufpt' is passed as 2nd parameter in call to function 'sqlStrAccumAppend' at printf.c:798, where it is dereferenced at printf.c:903.

  • chore: fix deref of null

Warning: Return value of a function 'space_cache_find' is dereferenced at trigger.c:364 without checking for NULL, but it is usually checked for this function (33/34).

  • fix: sequence_data_iterator_next_raw

Follow up for 33dc7181. Tests didnt catch that.

  • fix: properly patch check in narrow_conv_emit

Follow up for c6d684dd


  • Ref #278
  • Cherry-pick to: 24.3
  • Docs follow-up: not necessary
Edited by Dmitry Rodionov

Merge request reports