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 501 to 550 of 976
  1. Cancel the scroll-into-view event when the frame selection is destroyed.

    Seen in 1 report
  2. Canonicalise NaN through the standard number conversion instead of the raw float setter.

    Seen in 1 report
  3. Carry output padding and output sizes through the message type.

    Seen in 1 report
  4. Check an attacker-controlled count against the fixed array size before looping.

    Seen in 1 report
  5. Check arithmetic on length values for overflow before using the result to allocate a buffer.

    Seen in 1 report
  6. Check arithmetic on user-supplied sizes for overflow before allocating buffers.

    Seen in 1 report
  7. Check for integer overflow before adding lengths and allocating.

    Seen in 1 report
  8. Check for integer overflow before allocating a buffer.

    Seen in 1 report
  9. Check for integer overflow before multiplying palette counts and allocating.

    Seen in 1 report
  10. Check for integer overflow in the offset and size sum before the bounds check.

    Seen in 1 report
  11. Check for integer overflow when adding string lengths and extra space before allocating.

    Seen in 1 report
  12. Check for integer overflow when calculating buffer sizes from lengths.

    Seen in 1 report
  13. Check for integer overflow when calculating image allocation size.

    Seen in 1 report
  14. Check for integer overflow when calculating the needed buffer size for large width and precision values.

    Seen in 1 report
  15. Check for overflow before adding to a clipboard-supplied size.

    Seen in 1 report
  16. Check for overflow during repeated left shifts in the chunk size calculation.

    Seen in 1 report
  17. Check for overflow when adding one to a length before allocating.

    Seen in 1 report
  18. Check integer calculations for overflow or wraparound before using the result as a size.

    Seen in 1 report
  19. Check length and offset fields against the real buffer size before reading.

    Seen in 1 report
  20. Check packet length and field values against the destination buffer size before writing.

    Seen in 1 report
  21. Check teardown results in release builds and stop the callback thread before deleting the stream.

    Seen in 1 report
  22. Check that a character follows a backslash before advancing the parser.

    Seen in 1 report
  23. Check that a form field object is still valid after event handling frees it.

    Seen in 1 report
  24. Check that a pointer calculated from an attacker-controlled length stays within the packet buffer.

    Seen in 1 report
  25. Check that an element exists before assuming it does when only a closing tag is present.

    Seen in 1 report
  26. Check that enough bytes remain before reading a character at the current position.

    Seen in 1 report
  27. Check that facility name copy loops stay within the allocated buffer size.

    Seen in 1 report
  28. Check that offsets are non-negative as well as within upper bounds.

    Seen in 1 report
  29. Check that one string has ended before advancing both pointers past a space.

    Seen in 1 report
  30. Check that the base name length is greater than zero before indexing the last character.

    Seen in 1 report
  31. Check that the bit counter stays non-negative before using it as an index into the masks array.

    Seen in 1 report
  32. Check that the computed packet length fits in the allocated cluster before building the packet.

    Seen in 1 report
  33. Check that the dispatcher still exists after a callback that can destroy it.

    Seen in 1 report
  34. Check that the IME content observer is still alive before a pending key event uses it.

    Seen in 1 report
  35. Check that the input length is at least the tag length before subtracting it.

    Seen in 1 report
  36. Check that the input string is null-terminated before passing it to a length-based duplication.

    Seen in 1 report
  37. Check that the last row has at least the number of bytes the predictor assumes before reading or writing.

    Seen in 1 report
  38. Check that the remaining input holds the declared string length before copying.

    Seen in 1 report
  39. Check that the requested heartbeat length matches the actual payload length.

    Seen in 1 report
  40. Check that the scalar holds a string before reading its raw pointer.

    Seen in 1 report
  41. Check that the selection's frame is still alive before moving the caret.

    Seen in 1 report
  42. Check that the transaction count matches the hash count before iterating.

    Seen in 1 report
  43. Check the addition of buffer length and new data length for wraparound before the capacity check.

    Seen in 1 report
  44. Check the allocation size calculation for integer overflow before copying the payload.

    Seen in 1 report
  45. Check the Authorization header length before copying into the fixed-size buffer.

    Seen in 1 report
  46. Check the buffer table reference count before destroying a GEM handle on the import error path.

    Seen in 1 report
  47. Check the caller's declared send and receive buffer sizes before writing or reading.

    Seen in 1 report
  48. Check the caller-supplied output buffer size against the volume sector size before copying.

    Seen in 1 report
  49. Check the chain size addition for integer overflow before allocating.

    Seen in 1 report
  50. Check the count against the fixed array size while parsing translation vectors.

    Seen in 1 report