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 601 to 650 of 976
  1. Clear stale pointers to animation functions when the cycle collector frees them.

    Seen in 1 report
  2. Clear the buffer storage pointer after freeing it.

    Seen in 1 report
  3. Clear the stored element pointer when freeing the array so destruction does not dereference stale memory.

    Seen in 1 report
  4. Compare the chunk size against a maximum of the same width as the variable, and check the addition before allocating.

    Seen in 1 report
  5. Complete the fix for heap type index canonicalisation so recursive groups cannot confuse indices.

    Seen in 1 report
  6. Compute allocation sizes from the pointed-to type rather than the pointer variable.

    Seen in 1 report
  7. Copy from the caller pointer before freeing the existing buffer.

    Seen in 1 report
  8. Correct buffer handling in IOBase readline.

    Seen in 1 report
  9. Correct buffer handling in the HTML5 parser.

    Seen in 1 report
  10. Correct how Control Flow Guard handles objects in memory.

    Seen in 1 report
  11. Correct how IIS sanitises web requests so buffer lengths are checked before copying.

    Seen in 1 report
  12. Correct how the components handle objects in memory.

    Seen in 1 report
  13. Correct how the runtime handles objects in memory.

    Seen in 1 report
  14. Correct how the Transaction Manager handles objects in memory.

    Seen in 1 report
  15. Correct object lifetime during link state updates.

    Seen in 1 report
  16. Correct object lifetime during participant canonicalisation.

    Seen in 1 report
  17. Correct object lifetime during the refresh driver tick.

    Seen in 1 report
  18. Correct object lifetime during window opening.

    Seen in 1 report
  19. Correct object lifetime on the WebRTC socket thread.

    Seen in 1 report
  20. Correct object lifetime when setting a child document on an accessibility proxy.

    Seen in 1 report
  21. Correct the bounds check in the UTF16TextIterator consume method when handling fallback hint characters.

    Seen in 1 report
  22. Correct the bounds check in the VM's value move routine.

    Seen in 1 report
  23. Correct the buffer size calculation when processing server responses so the allocated size matches what is written.

    Seen in 1 report
  24. Correct the handling of debug exceptions in the kernel.

    Seen in 1 report
  25. Correct the handling of external pointers during scavenging so the external pointer table write stays in bounds.

    Seen in 1 report
  26. Correct the loop comparison and reduce the read size by the bytes already read.

    Seen in 1 report
  27. Correct the size check so a stream larger than the buffer is rejected.

    Seen in 1 report
  28. Correct the state stack handling so a superscript token in the top group does not pop an extra state.

    Seen in 1 report
  29. Cross-check individual key segment values against the header maximum key length and the stack buffer size.

    Seen in 1 report
  30. Declare members so the vendor decryptor is destroyed before the callback.

    Seen in 1 report
  31. Decrement the reference count when serialization fails.

    Seen in 1 report
  32. Derive known bits for 32-bit jumps from the full range rather than only the unsigned minimum and maximum, and tighten runtime ALU sanitation.

    Seen in 1 report
  33. Derive the sample count from all attachments, not only enabled draw buffers.

    Seen in 1 report
  34. Detach the ArrayBuffer in the base destructor before the backing store is freed.

    Seen in 1 report
  35. Dismiss the Java dialog when the native dialog controller is destroyed so the Java side does not hold a dangling pointer.

    Seen in 1 report
  36. Distinguish an explicit zero length from a missing length instead of falling back to strlen.

    Seen in 1 report
  37. Do not assign a stack-allocated array to a bignum pointer field that a reallocation routine may free.

    Seen in 1 report
  38. Do not clear the shared-frag flag on a packet that is still being forwarded.

    Seen in 1 report
  39. Do not destroy a handle when obtaining it failed.

    Seen in 1 report
  40. Do not free an element twice when a duplicate tag is found.

    Seen in 1 report
  41. Do not hold a pointer to a buffer across a call into user code that can detach it.

    Seen in 1 report
  42. Do not keep stale frame references when capturing layout history state.

    Seen in 1 report
  43. Do not mark the backend initialised from a flush completion handler.

    Seen in 1 report
  44. Do not overwrite an existing binding while other code holds raw pointers to its internals.

    Seen in 1 report
  45. Do not pass thread-affine weak pointers to tasks on other threads, or keep the sequence check in release builds.

    Seen in 1 report
  46. Do not replace a BigInt right shift by a large amount with a constant zero when the value is negative.

    Seen in 1 report
  47. Do not short-circuit callback loops during rollback, and only destroy transports once all channels have been updated.

    Seen in 1 report
  48. Do not subtract the skipped character count from the remaining length twice.

    Seen in 1 report
  49. Do not trust a process type value stored in the crashing process's own memory.

    Seen in 1 report
  50. Do not trust the PDF Length field to size the key derivation copy; cap it at the buffer size.

    Seen in 1 report