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 551 to 600 of 976
  1. Check the counter before linking the node, or size the pool from the actual list length.

    Seen in 1 report
  2. Check the credential length before copying into the fixed-size stack buffer.

    Seen in 1 report
  3. Check the decoded trailer ID length before writing it into the heap buffer.

    Seen in 1 report
  4. Check the destination buffer size before concatenating the coordinate file path.

    Seen in 1 report
  5. Check the destination buffer size before copying data into it during read-until parsing.

    Seen in 1 report
  6. Check the document is still alive before downcasting the script execution context.

    Seen in 1 report
  7. Check the escape character count calculation for overflow.

    Seen in 1 report
  8. Check the filename size increment for wraparound before copying.

    Seen in 1 report
  9. Check the length accumulator for overflow and verify the buffer is large enough before bulk appending.

    Seen in 1 report
  10. Check the length of attacker-controlled data before copying it into a fixed-size stack buffer.

    Seen in 1 report
  11. Check the length of file-supplied data before copying it into a fixed-size stack buffer.

    Seen in 1 report
  12. Check the length of guest-supplied data before copying it into a fixed-size heap buffer.

    Seen in 1 report
  13. Check the length of playlist entries before copying and converting them.

    Seen in 1 report
  14. Check the length of the target parameter after URL decoding.

    Seen in 1 report
  15. Check the length of the user name before copying it into the stack buffer.

    Seen in 1 report
  16. Check the length of user-supplied data before copying it into a fixed-length stack buffer.

    Seen in 1 report
  17. Check the number of SLC entries before writing into the global buffer.

    Seen in 1 report
  18. Check the path length against the stack buffer size before concatenating.

    Seen in 1 report
  19. Check the property length from the file against the destination buffer size before copying.

    Seen in 1 report
  20. Check the prototype value as well as the target object before allowing it to be set.

    Seen in 1 report
  21. Check the provider name length against the stack buffer capacity before copying.

    Seen in 1 report
  22. Check the range of converted numbers rather than trusting the conversion result.

    Seen in 1 report
  23. Check the reference tile width multiplication for integer overflow before sizing the heap buffer.

    Seen in 1 report
  24. Check the return value and output pointer of digest context finish functions before dereferencing.

    Seen in 1 report
  25. Check the return value of stream reads before using the resulting data.

    Seen in 1 report
  26. Check the return value of the virtqueue chain fetch before using the iovec array.

    Seen in 1 report
  27. Check the seal initialisation return value and validate the per-key encrypted lengths before using them as a copy size.

    Seen in 1 report
  28. Check the size multiplication for integer overflow before allocating the surface.

    Seen in 1 report
  29. Check the size of data received from a server before copying into a heap buffer.

    Seen in 1 report
  30. Check the size of incoming data before writing into a fixed buffer when unfolding or decompressing HTTP data.

    Seen in 1 report
  31. Check the snprintf return value for errors and treat negative lengths as failures before resizing or advancing the offset.

    Seen in 1 report
  32. Check the string count multiplication for overflow before allocating the pointer array.

    Seen in 1 report
  33. Check the string reader's return value before passing it to the tokeniser.

    Seen in 1 report
  34. Check the super page and writable bits in the fast path and stop allowing the super page flag in the disallow mask.

    Seen in 1 report
  35. Check the UUID conversion return value before freeing the pointer.

    Seen in 1 report
  36. Check the width times bytes-per-pixel multiplication for integer overflow.

    Seen in 1 report
  37. Check the write index against the array size on every line, not just at allocation time.

    Seen in 1 report
  38. Check whether a binding already exists before initialising its type.

    Seen in 1 report
  39. Check whether a child is already attached before attaching it again, and reject duplicate entries in the child array.

    Seen in 1 report
  40. Check whether a cookie was already removed or freed before freeing it again.

    Seen in 1 report
  41. Check whether a deleted node is an ancestor of any edited node, not just whether it is edited itself.

    Seen in 1 report
  42. Check whether stream reads failed, and refuse to allocate a zero-length buffer when the total size is zero.

    Seen in 1 report
  43. Clamp and range-check window size values received from a proxy.

    Seen in 1 report
  44. Clean up the paused query registry on early exit, not only in debug assertions.

    Seen in 1 report
  45. Clear a child document's parent pointer when the document is destroyed.

    Seen in 1 report
  46. Clear cached translations whenever the underlying address is changed.

    Seen in 1 report
  47. Clear or re-check the target element pointer when the element is removed and collected.

    Seen in 1 report
  48. Clear or revalidate the raw pointer to the media session service when it is destroyed on disconnect.

    Seen in 1 report
  49. Clear references to a freed page buffer in the parent object.

    Seen in 1 report
  50. Clear stale pointers in the old sync group when an audio stream moves to a new group.

    Seen in 1 report