Ticket #45 (closed defect: fixed)

Opened 17 months ago

Last modified 17 months ago

storage_sqlite using already freed buffer

Reported by: smoku Owned by: smoku
Priority: major Component: storage
Version: 2.1 Keywords:
Cc: Tracforge_linkmap:
Blocking: Blocked By:

Description

SQLITE_SAFE_* macros realloc buffer if not big enough, allocates it if NULL. After a free, pointer is not nullified, so macros keep using pointer as a normal usable buffer.

Fix is trivial: NULLify freed pointer, set size to 0, in order to force realloc next time.

(discovered in 2.0s9, still present in CVS)

Attachments

sqlite.diff (0.8 kB) - added by smoku 17 months ago.
Patch by Nicolas Pouillon <nipo@…>

Change History

Changed 17 months ago by smoku

Patch by Nicolas Pouillon <nipo@…>

Changed 17 months ago by smoku

  • status changed from new to closed
  • resolution set to fixed

(In [154]) Integrated SQLite fixes by Nicolas Pouillon. Closes #45

Note: See TracTickets for help on using tickets.