MCPcopy Create free account
hub / github.com/cgsecurity/testdisk / get32u

Function get32u

src/file_doc.c:792–802  ·  view source on GitHub ↗

@ @ requires \valid_read((char *)buffer + (offset .. offset + 4 - 1)); @ requires \initialized((char *)buffer + (offset .. offset + 4 - 1)); @ terminates \true; @ assigns \nothing; @*/

Source from the content-addressed store, hash-verified

790 @ assigns \nothing;
791 @*/
792static uint32_t get32u(const void *buffer, const unsigned int offset)
793{
794 /*@ assert \valid_read((char *)buffer + offset + (0 .. 4-1)); */
795 /*@ assert \initialized((char *)buffer + offset + (0 .. 4-1)); */
796 const char *ptr=(const char *)buffer+offset;
797 /*@ assert \valid_read(ptr + (0 .. 4-1)); */
798 /*@ assert \initialized(ptr + (0 .. 4-1)); */
799 const uint32_t *val=(const uint32_t *)ptr;
800 /*@ assert \valid_read(val); */
801 return le32(*val);
802}
803
804/*@
805 @ requires \valid_read((char *)buffer + (offset .. offset + 8 - 1));

Callers 6

OLE_parse_software_entryFunction · 0.85
OLE_parse_title_entryFunction · 0.85
OLE_parse_PropertySetFunction · 0.85
OLE_parse_summary_auxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected