Module BufferAccess

Import path

semmle.code.cpp.security.BufferAccess

Imports

cpp

Provides classes and predicates for working with C/C++/ObjC/ObjC++ code.

Predicates

getPointedSize

Returns the size of the pointed-to type, counting void types as size 1.

Classes

ArrayExprBA

A array access on a buffer: buffer[ix] but not: &buffer[ix]

BCopyBA

Calls to bcopy. bcopy(src, dest, num)

BufferAccess

An operation that reads data from or writes data to a buffer.

MemccpyBA

Calls to memccpy. memccpy(dest, src, c, n)

MemchrBA

Calls to memchr and similar functions. memchr(buffer, value, num) wmemchr(buffer, value, num)

MemcmpBA

Calls to memcmp and similar functions. memcmp(buffer1, buffer2, num) wmemcmp(buffer1, buffer2, num) _memicmp(buffer1, buffer2, count) _memicmp_l(buffer1, buffer2, count, locale)

MemcpyBA

Calls to memcpy and similar functions. memcpy(dest, src, num) wmemcpy(dest, src, num) memmove(dest, src, num) wmemmove(dest, src, num) mempcpy(dest, src, num); wmempcpy(dest, src, num);

MemsetBA

Calls to memset and similar functions. memset(dest, value, num) wmemset(dest, value, num)

StrncpyBA

Calls to strncpy. strncpy(dest, src, num)

SwabBA

Calls to swab and similar functions. swab(src, dest, num) _swab(src, dest, num)