[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] ae9c6e: Fix potential flaw in sqWin32PluginSupport / plugi...

GitHub noreply at github.com
Wed Jul 27 10:32:11 UTC 2016

  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: ae9c6e033f8d9b097c1a9009dfe36c9932ae35d6
  Author: Nicolas Cellier <nicolas.cellier at sirehna.com>
  Date:   2016-07-27 (Wed, 27 Jul 2016)

  Changed paths:
    M platforms/win32/vm/sqWin32PluginSupport.c

  Log Message:
  Fix potential flaw in sqWin32PluginSupport / pluginReceiveData

The pointer req could be used un-initialized if ever the id were not in expected range
This time, clang warning was a true positive:

../../platforms/win32/vm/sqWin32PluginSupport.c:328:6: warning: variable 'req' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
  if(id >= 0 && id < MAX_REQUESTS) req = requests[id];
../../platforms/win32/vm/sqWin32PluginSupport.c:329:6: note: uninitialized use occurs here
  if(req) {

More information about the Vm-dev mailing list