Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: David's improved precise mapping added

...

CWE-129 and ARR38-C

ARR38-C -CWE-129 = making library functions create invalid pointers without using untrusted data.

E.g. : char[3] array;

strcpy(array, "123456");

CWE-129 - ARR38-C =

...

not validating an integer used as an array index or in pointer arithmetic

eg: void foo(int i) {

  char array[3];

  array[i];

}

Intersection(ARR38-C, CWE-129) = making library functions create invalid pointers using untrusted data.

eg: void foo(int i) {

  char src[3], dest[3];

  memcpy(dest, src, i);

}

Bibliography

...