Skip to content

In-depth lesson · Memory corruption

Typical fixes

Every point the Memory corruption reports back under this heading, best-backed first, each with the reports it is seen in.

Back to the lesson 801 to 850 of 976
  1. Reserve the growable array before appending so element pointers stay valid.

    Seen in 1 report
  2. Reset freed pointers on the error path so they are not freed twice.

    Seen in 1 report
  3. Reset the accumulated write position when recomputing transform feedback capacity on resume.

    Seen in 1 report
  4. Reset the connect-only handle when its connection is freed.

    Seen in 1 report
  5. Reset the pointer after freeing so the same chunk is not freed again in a loop.

    Seen in 1 report
  6. Reset the scoped secondary draw state when the context is destroyed.

    Seen in 1 report
  7. Reset the stored read length when swapping in a smaller buffer mid-read.

    Seen in 1 report
  8. Resize the buffer before writing and add runtime bounds checks.

    Seen in 1 report
  9. Restore all lower-layer callbacks when the TLS layer is closed so no callback writes into a freed transfer buffer.

    Seen in 1 report
  10. Restore texture state on the early-return paths of multi-draw when texture preparation fails.

    Seen in 1 report
  11. Restrict IOCTL handlers to privileged callers and validate user arguments before passing them to memory copies.

    Seen in 1 report
  12. Return a parsing error when the assertion consumer service URL is missing.

    Seen in 1 report
  13. Return an error and avoid freeing shared state when initialisation fails.

    Seen in 1 report
  14. Return an error when the size calculation overflows instead of continuing to copy data.

    Seen in 1 report
  15. Return immediately after the size check fails.

    Seen in 1 report
  16. Rewrite or invalidate stored values when a composite attribute's type is altered, or re-check types at execution.

    Seen in 1 report
  17. Security update corrects how DirectX handles objects in memory.

    Seen in 1 report
  18. Security update corrects how Office handles objects in memory.

    Seen in 1 report
  19. Security update corrects how the runtime handles memory.

    Seen in 1 report
  20. Security update corrects how the TSF server validates and handles messages from TSF clients.

    Seen in 1 report
  21. Security update corrects how the VBScript engine handles objects in memory.

    Seen in 1 report
  22. Security update corrects how Windows GDI handles objects in memory.

    Seen in 1 report
  23. Security update corrects the memory handling in wlansvc.dll.

    Seen in 1 report
  24. Security update corrects the uninitialized variable that caused the out-of-bounds read.

    Seen in 1 report
  25. Security updates were issued for affected Mac versions of Office.

    Seen in 1 report
  26. Select the SIMD kernel based on the narrowest plane width it will process.

    Seen in 1 report
  27. Set an error code on unsupported bit depth so the data phase does not run.

    Seen in 1 report
  28. Size scratch buffers using the same format used by the packing routine and check the result of size arithmetic.

    Seen in 1 report
  29. Size the buffer so the null terminator fits when the alias length is set to the manifest length minus fourteen.

    Seen in 1 report
  30. Size the character array to allow for the minus sign and terminator of the longest negative value.

    Seen in 1 report
  31. Size the copy from the number of values actually pushed, not from the declared count.

    Seen in 1 report
  32. Size the destination buffer by the actual multi-byte width of the characters.

    Seen in 1 report
  33. Size the ellipse shape buffer from the same values used to index it.

    Seen in 1 report
  34. Size the realpath buffer to at least PATH_MAX rather than a pathconf value or 256-byte fallback.

    Seen in 1 report
  35. Store the compressed size in a wide enough type so it cannot truncate.

    Seen in 1 report
  36. Synchronise fence destruction with asynchronous fence signalling.

    Seen in 1 report
  37. Synchronise session teardown against other connections holding the same user object.

    Seen in 1 report
  38. Synchronise texture parameter state to the backend before calculating level indices.

    Seen in 1 report
  39. Take the shared mutex on every path that touches the buffer handle.

    Seen in 1 report
  40. The credential helper double free was fixed in version 0.6.3.

    Seen in 1 report
  41. The DataView constructor should re-check whether the ArrayBuffer was detached after calling the prototype getter.

    Seen in 1 report
  42. The decoder should check skip and count pairs cumulatively against the line width, not each pair on its own.

    Seen in 1 report
  43. The decompressed size calculation should match the actual decompressed stream before the buffer is handed to the decompression routine.

    Seen in 1 report
  44. The error path should clear the input pointer when the buffer allocation fails so a later call does not write into freed memory.

    Seen in 1 report
  45. The fixed version stops copying the filename after six characters.

    Seen in 1 report
  46. The maximum array size macro should divide by the element size so the allocation check rejects oversized requests.

    Seen in 1 report
  47. The update removes Equation Editor functionality rather than patching the parser.

    Seen in 1 report
  48. The vendor classified the risk as shared and will not release a patch, so the fix is to restrict which Bluetooth devices can pair.

    Seen in 1 report
  49. The vendor fixed the wowlan_config use-after-free in a firmware release.

    Seen in 1 report
  50. Track 32-bit sub-register bounds using the 32-bit values rather than the 64-bit ones.

    Seen in 1 report