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 651 to 700 of 976
  1. Do not use a freed string in log messages; copy it before freeing.

    Seen in 1 report
  2. Do not use a string length call on data that is not guaranteed to be null-terminated.

    Seen in 1 report
  3. Emit a nil-pointer check when accessing fields through embedded pointers.

    Seen in 1 report
  4. Enable secure coding and use a class allowlist when decoding archived objects.

    Seen in 1 report
  5. End an active pixel local storage session on resource-resizing entry points.

    Seen in 1 report
  6. Enforce that an imported tag signature is not a subtype of the defined tag signature so type invariance holds.

    Seen in 1 report
  7. Enforce that read ranges were previously written.

    Seen in 1 report
  8. Enforce that the element data section has as many entries as the element section.

    Seen in 1 report
  9. Enforce the extension count bound at runtime rather than only in a debug assertion.

    Seen in 1 report
  10. Enforce the maximum string length in Adopt so the length-addition invariant holds.

    Seen in 1 report
  11. Ensure Azure Stack sanitises user inputs so buffer lengths are checked before copying.

    Seen in 1 report
  12. Ensure release builds actually enable ASLR and DEP through the compiler and linker flags.

    Seen in 1 report
  13. Ensure the arena pool is freed only once in the certificate email address extraction path.

    Seen in 1 report
  14. Ensure the binding restore actually runs on all platforms before the temporary framebuffer is deleted.

    Seen in 1 report
  15. Ensure the channel array is allocated with sufficient size before writing to it.

    Seen in 1 report
  16. Ensure the error path does not free the same transmit buffer twice.

    Seen in 1 report
  17. Ensure the filter observer does not outlive the element it references.

    Seen in 1 report
  18. Escape non-printable bytes when printing server-supplied filenames to the terminal.

    Seen in 1 report
  19. Exception setting should verify that the object it is given is actually an exception type.

    Seen in 1 report
  20. Extend the argument stack before writing the result.

    Seen in 1 report
  21. Fetch update and finder information over an authenticated encrypted channel.

    Seen in 1 report
  22. Filter reserved sentinel hash values before inserting keys into a traced map.

    Seen in 1 report
  23. Fix the DXC scalarisation pass so an erased instruction is not referenced again during the same transformation.

    Seen in 1 report
  24. Fix the invalid shape pointer used when tracing a baseline JIT stub during garbage collection.

    Seen in 1 report
  25. Fix the lifetime issue between the WebGPU implementation and the D3D12 library.

    Seen in 1 report
  26. Fix the memory corruption in the property access path reached under memory pressure.

    Seen in 1 report
  27. Fix the processor's handling of the vector register clearing instruction during speculative execution.

    Seen in 1 report
  28. Force small-integer tagging or emit the write barrier when storing into a small-integer field.

    Seen in 1 report
  29. Free arena-allocated items with the matching arena deallocator on the error path.

    Seen in 1 report
  30. Free saved IP options only after a grace period so other CPUs cannot still be reading them.

    Seen in 1 report
  31. Fully clear or invalidate the session structure during teardown so later packets cannot dereference released memory.

    Seen in 1 report
  32. Fully mitigate the stack buffer overflow server-side so no customer action is needed.

    Seen in 1 report
  33. Give the response code clear ownership so a repeating callback cannot hold a raw pointer to freed memory.

    Seen in 1 report
  34. Grow the buffer to fit the requested level rather than by a fixed increment.

    Seen in 1 report
  35. Guard against a handle being removed from a nested socket callback while the pollset is being walked.

    Seen in 1 report
  36. Guard against recursive invocation of the hash default block.

    Seen in 1 report
  37. Guard the integer addition when accumulating custom clipboard data length.

    Seen in 1 report
  38. Guard the object with a weak pointer across the nested message loop.

    Seen in 1 report
  39. Guard the pointer addition against integer overflow before the bounds comparison.

    Seen in 1 report
  40. Handle a failed reallocation before using the attribute array.

    Seen in 1 report
  41. Handle a percent sign at the end of a string without reading past the terminator.

    Seen in 1 report
  42. Handle a trailing percent sign in the format string without skipping the null terminator.

    Seen in 1 report
  43. Handle the data tag of a transferred object so the alloc or mapped tag invariant holds.

    Seen in 1 report
  44. Handle the empty CDATA case so the length calculation cannot underflow.

    Seen in 1 report
  45. Handle the null case in stream context defaults.

    Seen in 1 report
  46. Hold an owning reference to the frame selection for the lifetime of the scroll event.

    Seen in 1 report
  47. Hold refcounted references to FontFace objects in the local array so user JavaScript cannot free them mid-iteration.

    Seen in 1 report
  48. Hold the sink lock in the device switch callback.

    Seen in 1 report
  49. Implement real reference counting instead of stubbing AddRef and Release.

    Seen in 1 report