[{"data":1,"prerenderedAt":4907},["ShallowReactive",2],{"global-navigation":3,"page-\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio02-c":28,"surround-\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio02-c":3109,"sidebar-sei-cert-c-coding-standard":3116},[4,8],{"title":5,"path":6,"_path":6,"fromAppConfig":7},"Home","\u002F",true,{"title":9,"path":10,"children":11,"_path":27,"fromAppConfig":7},"Coding Standards","\u002Fcoding-standards\u002F",[12,15,18,21,24],{"title":13,"path":14},"Android Coding Standard","\u002Fandroid-secure-coding-standard\u002F",{"title":16,"path":17},"C Coding Standard","\u002Fsei-cert-c-coding-standard\u002F",{"title":19,"path":20},"C++ Coding Standard","\u002Fsei-cert-cpp-coding-standard\u002F",{"title":22,"path":23},"Java Coding Standard","\u002Fsei-cert-oracle-coding-standard-for-java\u002F",{"title":25,"path":26},"Perl Coding Standard","\u002Fsei-cert-perl-coding-standard\u002F","\u002Fcoding-standards",{"id":29,"title":30,"body":31,"description":3089,"extension":3090,"meta":3091,"navigation":7,"path":3105,"seo":3106,"stem":3107,"__hash__":3108},"content\u002F4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F03.fio02-c.md","FIO02-C. Canonicalize path names originating from tainted sources",{"type":32,"value":33,"toc":3072},"minimark",[34,38,53,56,59,341,348,353,374,381,487,491,494,510,530,543,558,601,620,626,658,671,839,870,1148,1159,1163,1181,1193,1196,1234,1253,1660,1665,1683,1687,1703,1832,1838,1842,1853,2356,2370,2378,2382,2390,2394,2407,2473,2477,2716,2720,2741,2760,2772,2776,2890,2894,3023,3026,3048,3052,3068],[35,36,30],"h1",{"id":37},"fio02-c-canonicalize-path-names-originating-from-tainted-sources",[39,40,41,42,47,48,52],"p",{},"Path names, directory names, and file names may contain characters that make ",[43,44,46],"a",{"href":45},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fbb-definitions#BB.Definitions-validation","validation"," difficult and inaccurate. Furthermore, any path name component can be a symbolic link, which further obscures the actual location or identity of a file. To simplify file name validation, it is recommended that names be translated into their ",[49,50,51],"em",{},"canonical"," form. Canonicalizing file names makes it much easier to verify a path, directory, or file name by making it easier to compare names.",[39,54,55],{},"Because the canonical form can vary between operating systems and file systems, it is best to use operating-system-specific mechanisms for canonicalization.",[39,57,58],{},"As an illustration, here is a function that ensures that a path name refers to a file in the user's home directory on POSIX systems:",[60,61,63],"code-block",{"quality":62},"good",[64,65,70],"pre",{"className":66,"code":67,"language":68,"meta":69,"style":69},"language-c shiki shiki-themes github-light github-dark monokai","#include \u003Cpwd.h>\n#include \u003Cunistd.h>\n#include \u003Cstring.h>\n\nint verify_file(char *const filename) {\n  \u002F* Get \u002Fetc\u002Fpasswd entry for current user *\u002F\n  struct passwd *pwd = getpwuid(getuid());\n  if (pwd == NULL) {\n    \u002F* Handle error *\u002F\n    return 0;\n  }\n\n  const size_t len = strlen( pwd->pw_dir);\n  if (strncmp( filename, pwd->pw_dir, len) != 0) {\n    return 0;\n  }\n  \u002F* Make sure there is only one '\u002F', immediately after homedir *\u002F\n  if (strrchr( filename, '\u002F') == filename + len) {\n    return 1;\n  }\n  return 0;\n}\n","c","",[71,72,73,86,94,102,108,136,143,172,190,196,208,214,219,239,260,269,274,280,310,320,325,335],"code",{"__ignoreMap":69},[74,75,78,82],"span",{"class":76,"line":77},"line",1,[74,79,81],{"class":80},"sC2Qs","#include",[74,83,85],{"class":84},"sstjo"," \u003Cpwd.h>\n",[74,87,89,91],{"class":76,"line":88},2,[74,90,81],{"class":80},[74,92,93],{"class":84}," \u003Cunistd.h>\n",[74,95,97,99],{"class":76,"line":96},3,[74,98,81],{"class":80},[74,100,101],{"class":84}," \u003Cstring.h>\n",[74,103,105],{"class":76,"line":104},4,[74,106,107],{"emptyLinePlaceholder":7},"\n",[74,109,111,115,119,123,126,129,133],{"class":76,"line":110},5,[74,112,114],{"class":113},"sq6CD","int",[74,116,118],{"class":117},"srTi1"," verify_file",[74,120,122],{"class":121},"sMOD_","(",[74,124,125],{"class":113},"char",[74,127,128],{"class":80}," *const",[74,130,132],{"class":131},"sTHNf"," filename",[74,134,135],{"class":121},") {\n",[74,137,139],{"class":76,"line":138},6,[74,140,142],{"class":141},"s8-w5","  \u002F* Get \u002Fetc\u002Fpasswd entry for current user *\u002F\n",[74,144,146,149,152,155,158,161,164,166,169],{"class":76,"line":145},7,[74,147,148],{"class":113},"  struct",[74,150,151],{"class":121}," passwd ",[74,153,154],{"class":80},"*",[74,156,157],{"class":121},"pwd ",[74,159,160],{"class":80},"=",[74,162,163],{"class":117}," getpwuid",[74,165,122],{"class":121},[74,167,168],{"class":117},"getuid",[74,170,171],{"class":121},"());\n",[74,173,175,178,181,184,188],{"class":76,"line":174},8,[74,176,177],{"class":80},"  if",[74,179,180],{"class":121}," (pwd ",[74,182,183],{"class":80},"==",[74,185,187],{"class":186},"s7F3e"," NULL",[74,189,135],{"class":121},[74,191,193],{"class":76,"line":192},9,[74,194,195],{"class":141},"    \u002F* Handle error *\u002F\n",[74,197,199,202,205],{"class":76,"line":198},10,[74,200,201],{"class":80},"    return",[74,203,204],{"class":186}," 0",[74,206,207],{"class":121},";\n",[74,209,211],{"class":76,"line":210},11,[74,212,213],{"class":121},"  }\n",[74,215,217],{"class":76,"line":216},12,[74,218,107],{"emptyLinePlaceholder":7},[74,220,222,225,228,231,233,236],{"class":76,"line":221},13,[74,223,224],{"class":80},"  const",[74,226,227],{"class":113}," size_t",[74,229,230],{"class":121}," len ",[74,232,160],{"class":80},[74,234,235],{"class":117}," strlen",[74,237,238],{"class":121},"( pwd->pw_dir);\n",[74,240,242,244,247,250,253,256,258],{"class":76,"line":241},14,[74,243,177],{"class":80},[74,245,246],{"class":121}," (",[74,248,249],{"class":117},"strncmp",[74,251,252],{"class":121},"( filename, pwd->pw_dir, len) ",[74,254,255],{"class":80},"!=",[74,257,204],{"class":186},[74,259,135],{"class":121},[74,261,263,265,267],{"class":76,"line":262},15,[74,264,201],{"class":80},[74,266,204],{"class":186},[74,268,207],{"class":121},[74,270,272],{"class":76,"line":271},16,[74,273,213],{"class":121},[74,275,277],{"class":76,"line":276},17,[74,278,279],{"class":141},"  \u002F* Make sure there is only one '\u002F', immediately after homedir *\u002F\n",[74,281,283,285,287,290,293,296,299,301,304,307],{"class":76,"line":282},18,[74,284,177],{"class":80},[74,286,246],{"class":121},[74,288,289],{"class":117},"strrchr",[74,291,292],{"class":121},"( filename, ",[74,294,295],{"class":84},"'\u002F'",[74,297,298],{"class":121},") ",[74,300,183],{"class":80},[74,302,303],{"class":121}," filename ",[74,305,306],{"class":80},"+",[74,308,309],{"class":121}," len) {\n",[74,311,313,315,318],{"class":76,"line":312},19,[74,314,201],{"class":80},[74,316,317],{"class":186}," 1",[74,319,207],{"class":121},[74,321,323],{"class":76,"line":322},20,[74,324,213],{"class":121},[74,326,328,331,333],{"class":76,"line":327},21,[74,329,330],{"class":80},"  return",[74,332,204],{"class":186},[74,334,207],{"class":121},[74,336,338],{"class":76,"line":337},22,[74,339,340],{"class":121},"}\n",[39,342,343,344,347],{},"The ",[71,345,346],{},"verify_file()"," function requires that the file name be an absolute path name. Furthermore, it can be deceived if the file name being referenced is actually a symbolic link to a file name not in the users's home directory.",[349,350,352],"h2",{"id":351},"noncompliant-code-example","Noncompliant Code Example",[39,354,355,356,359,360,364,365,367,368,370,371,373],{},"In this noncompliant example, ",[71,357,358],{},"argv[1]"," contains a file name that originates from a ",[43,361,363],{"href":362},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fbb-definitions#BB.Definitions-taintedsource","tainted source"," and is opened for writing. Before this file name is used in file operations, it should be validated to ensure that it refers to an expected and valid file. Unfortunately, the file name referenced by ",[71,366,358],{}," may contain special characters, such as directory characters, that make ",[43,369,46],{"href":45}," difficult if not impossible. Furthermore, any path name component in ",[71,372,358],{}," may be a symbolic link, resulting in the file name referring to an invalid file even though it passes validation.",[39,375,376,377,380],{},"If validation is not performed correctly, the call to ",[71,378,379],{},"fopen()"," may result in an unintended file being accessed.",[60,382,384],{"quality":383},"bad",[64,385,387],{"className":66,"code":386,"language":68,"meta":69,"style":69},"\u002F* Verify argv[1] is supplied *\u002F\n\nif (!verify_file(argv[1])) {\n  \u002F* Handle error *\u002F\n}\n\nif (fopen(argv[1], \"w\") == NULL) {\n  \u002F* Handle error *\u002F\n}\n\n\u002F* ... *\u002F\n",[71,388,389,394,398,426,431,435,439,470,474,478,482],{"__ignoreMap":69},[74,390,391],{"class":76,"line":77},[74,392,393],{"class":141},"\u002F* Verify argv[1] is supplied *\u002F\n",[74,395,396],{"class":76,"line":88},[74,397,107],{"emptyLinePlaceholder":7},[74,399,400,403,405,408,411,413,417,420,423],{"class":76,"line":96},[74,401,402],{"class":80},"if",[74,404,246],{"class":121},[74,406,407],{"class":80},"!",[74,409,410],{"class":117},"verify_file",[74,412,122],{"class":121},[74,414,416],{"class":415},"sOrwc","argv",[74,418,419],{"class":121},"[",[74,421,422],{"class":186},"1",[74,424,425],{"class":121},"])) {\n",[74,427,428],{"class":76,"line":104},[74,429,430],{"class":141},"  \u002F* Handle error *\u002F\n",[74,432,433],{"class":76,"line":110},[74,434,340],{"class":121},[74,436,437],{"class":76,"line":138},[74,438,107],{"emptyLinePlaceholder":7},[74,440,441,443,445,448,450,452,454,456,459,462,464,466,468],{"class":76,"line":145},[74,442,402],{"class":80},[74,444,246],{"class":121},[74,446,447],{"class":117},"fopen",[74,449,122],{"class":121},[74,451,416],{"class":415},[74,453,419],{"class":121},[74,455,422],{"class":186},[74,457,458],{"class":121},"], ",[74,460,461],{"class":84},"\"w\"",[74,463,298],{"class":121},[74,465,183],{"class":80},[74,467,187],{"class":186},[74,469,135],{"class":121},[74,471,472],{"class":76,"line":174},[74,473,430],{"class":141},[74,475,476],{"class":76,"line":192},[74,477,340],{"class":121},[74,479,480],{"class":76,"line":198},[74,481,107],{"emptyLinePlaceholder":7},[74,483,484],{"class":76,"line":210},[74,485,486],{"class":141},"\u002F* ... *\u002F\n",[349,488,490],{"id":489},"compliant-solution-posix","Compliant Solution (POSIX)",[39,492,493],{},"Canonicalizing file names is difficult and involves an understanding of the underlying file system.",[39,495,496,497,500,501,504,505,509],{},"The POSIX ",[71,498,499],{},"realpath()"," function can assist in converting path names to their canonical form. According to ",[49,502,503],{},"Standard for Information Technology—Portable Operating System Interface (POSIX®), Base Specifications, Issue 7"," (IEEE Std 1003.1, 2013 Edition) [ ",[43,506,508],{"href":507},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-IEEEStd1003.1-2013","IEEE Std 1003.1:2013"," ],",[511,512,513],"blockquote",{},[39,514,343,515,517,518,521,522,525,526,529],{},[71,516,499],{}," function shall derive, from the pathname pointed to by ",[71,519,520],{},"file_name"," , an absolute pathname that names the same file, whose resolution does not involve ' ",[71,523,524],{},"."," ', ' ",[71,527,528],{},".."," ', or symbolic links.",[39,531,532,533,539,540,542],{},"Further verification, such as ensuring that two successive slashes or unexpected special files do not appear in the file name, must be performed. See ",[43,534,538],{"href":535,"rel":536},"http:\u002F\u002Fpubs.opengroup.org\u002Fonlinepubs\u002F9699919799\u002Fbasedefs\u002FV1_chap04.html#tag_04_12",[537],"nofollow","Section 4.12, \"Pathname Resolution,\""," of IEEE Std 1003.1, 2013 Edition, for more details on how path name resolution is performed [ ",[43,541,508],{"href":507}," ].",[39,544,545,546,548,549,552,553,557],{},"Many manual pages for the ",[71,547,499],{}," function come with an alarming warning, such as this one from the ",[49,550,551],{},"Linux Programmer's Manual"," [ ",[43,554,556],{"href":555},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-Linux08","Linux 2008"," ]:",[511,559,560,594],{},[39,561,562,563,566,567,570,571,574,575,577,578,581,582,584,585,587,588,590,591,593],{},"Avoid using this function. It is broken by design since (unless using the non-standard ",[71,564,565],{},"   resolved_path == NULL  "," feature) it is impossible to determine a suitable size for the output buffer, ",[71,568,569],{},"resolved_path"," . According to POSIX a buffer of size ",[71,572,573],{},"PATH_MAX"," suffices, but ",[71,576,573],{}," need not be a defined constant, and may have to be obtained using ",[71,579,580],{},"pathconf(3)"," . And asking ",[71,583,580],{}," does not really help, since on the one hand POSIX warns that the result of ",[71,586,580],{}," may be huge and unsuitable for mallocing memory. And on the other hand ",[71,589,580],{}," may return −1 to signify that ",[71,592,573],{}," is not bounded.",[39,595,596,597,600],{},"The libc4 and libc5 implementation contains a buffer overflow (fixed in libc-5.4.13). As a result, set-user-ID programs like ",[71,598,599],{},"mount(8)"," need a private version.",[39,602,343,603,605,606,610,611,614,615,619],{},[71,604,499],{}," function was changed in POSIX.1-2008. Older versions of POSIX allow ",[43,607,609],{"href":608},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fbb-definitions#BB.Definitions-implementation-definedbehavior","implementation-defined behavior"," in situations where the ",[71,612,613],{},"resolved_name"," is a null pointer. The current POSIX revision and many current ",[43,616,618],{"href":617},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fbb-definitions#BB.Definitions-implementation","implementations"," (led by glibc and Linux) allocate memory to hold the resolved name if a null pointer is used for this argument.",[39,621,622,623,625],{},"The following statement can be used to conditionally include code that depends on this revised form of the ",[71,624,499],{}," function:",[64,627,631],{"className":628,"code":629,"language":630,"meta":69,"style":69},"language-java shiki shiki-themes github-light github-dark monokai","#if _POSIX_VERSION >= 200809L || defined (linux)\n","java",[71,632,633],{"__ignoreMap":69},[74,634,635,638,640,643,646,649,652,655],{"class":76,"line":77},[74,636,637],{"class":121},"#",[74,639,402],{"class":80},[74,641,642],{"class":121}," _POSIX_VERSION ",[74,644,645],{"class":80},">=",[74,647,648],{"class":186}," 200809L",[74,650,651],{"class":80}," ||",[74,653,654],{"class":117}," defined",[74,656,657],{"class":121}," (linux)\n",[39,659,660,661,663,664,666,667,670],{},"Consequently, despite the alarming warnings, it is safe to call ",[71,662,499],{}," with ",[71,665,613],{}," assigned the value ",[71,668,669],{},"NULL"," (on systems that support it), as shown in this compliant solution:",[60,672,673],{"quality":62},[64,674,676],{"className":66,"code":675,"language":68,"meta":69,"style":69},"char *realpath_res = NULL;\n\n\u002F* Verify argv[1] is supplied *\u002F\n\nrealpath_res = realpath(argv[1], NULL);\nif (realpath_res == NULL) {\n  \u002F* Handle error *\u002F\n}\n\nif (!verify_file(realpath_res)) {\n  \u002F* Handle error *\u002F\n}\n\nif (fopen(realpath_res, \"w\") == NULL) {\n  \u002F* Handle error *\u002F\n}\n\n\u002F* ... *\u002F\n\nfree(realpath_res);\nrealpath_res = NULL;\n",[71,677,678,694,698,702,706,730,743,747,751,755,768,772,776,780,801,805,809,813,817,821,829],{"__ignoreMap":69},[74,679,680,682,685,688,690,692],{"class":76,"line":77},[74,681,125],{"class":113},[74,683,684],{"class":80}," *",[74,686,687],{"class":121},"realpath_res ",[74,689,160],{"class":80},[74,691,187],{"class":186},[74,693,207],{"class":121},[74,695,696],{"class":76,"line":88},[74,697,107],{"emptyLinePlaceholder":7},[74,699,700],{"class":76,"line":96},[74,701,393],{"class":141},[74,703,704],{"class":76,"line":104},[74,705,107],{"emptyLinePlaceholder":7},[74,707,708,710,712,715,717,719,721,723,725,727],{"class":76,"line":110},[74,709,687],{"class":121},[74,711,160],{"class":80},[74,713,714],{"class":117}," realpath",[74,716,122],{"class":121},[74,718,416],{"class":415},[74,720,419],{"class":121},[74,722,422],{"class":186},[74,724,458],{"class":121},[74,726,669],{"class":186},[74,728,729],{"class":121},");\n",[74,731,732,734,737,739,741],{"class":76,"line":138},[74,733,402],{"class":80},[74,735,736],{"class":121}," (realpath_res ",[74,738,183],{"class":80},[74,740,187],{"class":186},[74,742,135],{"class":121},[74,744,745],{"class":76,"line":145},[74,746,430],{"class":141},[74,748,749],{"class":76,"line":174},[74,750,340],{"class":121},[74,752,753],{"class":76,"line":192},[74,754,107],{"emptyLinePlaceholder":7},[74,756,757,759,761,763,765],{"class":76,"line":198},[74,758,402],{"class":80},[74,760,246],{"class":121},[74,762,407],{"class":80},[74,764,410],{"class":117},[74,766,767],{"class":121},"(realpath_res)) {\n",[74,769,770],{"class":76,"line":210},[74,771,430],{"class":141},[74,773,774],{"class":76,"line":216},[74,775,340],{"class":121},[74,777,778],{"class":76,"line":221},[74,779,107],{"emptyLinePlaceholder":7},[74,781,782,784,786,788,791,793,795,797,799],{"class":76,"line":241},[74,783,402],{"class":80},[74,785,246],{"class":121},[74,787,447],{"class":117},[74,789,790],{"class":121},"(realpath_res, ",[74,792,461],{"class":84},[74,794,298],{"class":121},[74,796,183],{"class":80},[74,798,187],{"class":186},[74,800,135],{"class":121},[74,802,803],{"class":76,"line":262},[74,804,430],{"class":141},[74,806,807],{"class":76,"line":271},[74,808,340],{"class":121},[74,810,811],{"class":76,"line":276},[74,812,107],{"emptyLinePlaceholder":7},[74,814,815],{"class":76,"line":282},[74,816,486],{"class":141},[74,818,819],{"class":76,"line":312},[74,820,107],{"emptyLinePlaceholder":7},[74,822,823,826],{"class":76,"line":322},[74,824,825],{"class":117},"free",[74,827,828],{"class":121},"(realpath_res);\n",[74,830,831,833,835,837],{"class":76,"line":327},[74,832,687],{"class":121},[74,834,160],{"class":80},[74,836,187],{"class":186},[74,838,207],{"class":121},[39,840,841,842,844,845,847,848,850,851,854,855,857,858,860,861,863,864,866,867,869],{},"It is also safe to call ",[71,843,499],{}," with a non-null ",[71,846,569],{}," provided that ",[71,849,573],{}," is defined as a constant in ",[71,852,853],{},"\u003Climits.h>"," . In this case, the ",[71,856,499],{}," function expects ",[71,859,569],{}," to refer to a character array that is large enough to hold the canonicalized path. If ",[71,862,573],{}," is defined, allocate a buffer of size ",[71,865,573],{}," to hold the result of ",[71,868,499],{}," , as shown in this compliant solution:",[60,871,872],{"quality":62},[64,873,875],{"className":66,"code":874,"language":68,"meta":69,"style":69},"char *realpath_res = NULL;\nchar *canonical_file name = NULL;\nsize_t path_size = 0;\n\n\u002F* Verify argv[1] is supplied *\u002F\n\npath_size = (size_t)PATH_MAX;\n\nif (path_size > 0) {\n  canonical_filename = malloc(path_size);\n\n  if (canonical_filename == NULL) {\n    \u002F* Handle error *\u002F\n  }\n\n  realpath_res = realpath(argv[1], canonical_filename);\n}\n\nif (realpath_res == NULL) {\n  \u002F* Handle error *\u002F\n}\n\nif (!verify_file(realpath_res)) {\n  \u002F* Handle error *\u002F\n}\nif (fopen(realpath_res, \"w\") == NULL ) {\n  \u002F* Handle error *\u002F\n}\n\n\u002F* ... *\u002F\n\nfree(canonical_filename);\ncanonical_filename = NULL;\n",[71,876,877,891,906,920,924,928,932,946,950,964,977,981,994,998,1002,1006,1026,1030,1034,1046,1050,1054,1058,1071,1076,1081,1103,1108,1113,1118,1123,1128,1136],{"__ignoreMap":69},[74,878,879,881,883,885,887,889],{"class":76,"line":77},[74,880,125],{"class":113},[74,882,684],{"class":80},[74,884,687],{"class":121},[74,886,160],{"class":80},[74,888,187],{"class":186},[74,890,207],{"class":121},[74,892,893,895,897,900,902,904],{"class":76,"line":88},[74,894,125],{"class":113},[74,896,684],{"class":80},[74,898,899],{"class":121},"canonical_file name ",[74,901,160],{"class":80},[74,903,187],{"class":186},[74,905,207],{"class":121},[74,907,908,911,914,916,918],{"class":76,"line":96},[74,909,910],{"class":113},"size_t",[74,912,913],{"class":121}," path_size ",[74,915,160],{"class":80},[74,917,204],{"class":186},[74,919,207],{"class":121},[74,921,922],{"class":76,"line":104},[74,923,107],{"emptyLinePlaceholder":7},[74,925,926],{"class":76,"line":110},[74,927,393],{"class":141},[74,929,930],{"class":76,"line":138},[74,931,107],{"emptyLinePlaceholder":7},[74,933,934,937,939,941,943],{"class":76,"line":145},[74,935,936],{"class":121},"path_size ",[74,938,160],{"class":80},[74,940,246],{"class":121},[74,942,910],{"class":113},[74,944,945],{"class":121},")PATH_MAX;\n",[74,947,948],{"class":76,"line":174},[74,949,107],{"emptyLinePlaceholder":7},[74,951,952,954,957,960,962],{"class":76,"line":192},[74,953,402],{"class":80},[74,955,956],{"class":121}," (path_size ",[74,958,959],{"class":80},">",[74,961,204],{"class":186},[74,963,135],{"class":121},[74,965,966,969,971,974],{"class":76,"line":198},[74,967,968],{"class":121},"  canonical_filename ",[74,970,160],{"class":80},[74,972,973],{"class":117}," malloc",[74,975,976],{"class":121},"(path_size);\n",[74,978,979],{"class":76,"line":210},[74,980,107],{"emptyLinePlaceholder":7},[74,982,983,985,988,990,992],{"class":76,"line":216},[74,984,177],{"class":80},[74,986,987],{"class":121}," (canonical_filename ",[74,989,183],{"class":80},[74,991,187],{"class":186},[74,993,135],{"class":121},[74,995,996],{"class":76,"line":221},[74,997,195],{"class":141},[74,999,1000],{"class":76,"line":241},[74,1001,213],{"class":121},[74,1003,1004],{"class":76,"line":262},[74,1005,107],{"emptyLinePlaceholder":7},[74,1007,1008,1011,1013,1015,1017,1019,1021,1023],{"class":76,"line":271},[74,1009,1010],{"class":121},"  realpath_res ",[74,1012,160],{"class":80},[74,1014,714],{"class":117},[74,1016,122],{"class":121},[74,1018,416],{"class":415},[74,1020,419],{"class":121},[74,1022,422],{"class":186},[74,1024,1025],{"class":121},"], canonical_filename);\n",[74,1027,1028],{"class":76,"line":276},[74,1029,340],{"class":121},[74,1031,1032],{"class":76,"line":282},[74,1033,107],{"emptyLinePlaceholder":7},[74,1035,1036,1038,1040,1042,1044],{"class":76,"line":312},[74,1037,402],{"class":80},[74,1039,736],{"class":121},[74,1041,183],{"class":80},[74,1043,187],{"class":186},[74,1045,135],{"class":121},[74,1047,1048],{"class":76,"line":322},[74,1049,430],{"class":141},[74,1051,1052],{"class":76,"line":327},[74,1053,340],{"class":121},[74,1055,1056],{"class":76,"line":337},[74,1057,107],{"emptyLinePlaceholder":7},[74,1059,1061,1063,1065,1067,1069],{"class":76,"line":1060},23,[74,1062,402],{"class":80},[74,1064,246],{"class":121},[74,1066,407],{"class":80},[74,1068,410],{"class":117},[74,1070,767],{"class":121},[74,1072,1074],{"class":76,"line":1073},24,[74,1075,430],{"class":141},[74,1077,1079],{"class":76,"line":1078},25,[74,1080,340],{"class":121},[74,1082,1084,1086,1088,1090,1092,1094,1096,1098,1100],{"class":76,"line":1083},26,[74,1085,402],{"class":80},[74,1087,246],{"class":121},[74,1089,447],{"class":117},[74,1091,790],{"class":121},[74,1093,461],{"class":84},[74,1095,298],{"class":121},[74,1097,183],{"class":80},[74,1099,187],{"class":186},[74,1101,1102],{"class":121}," ) {\n",[74,1104,1106],{"class":76,"line":1105},27,[74,1107,430],{"class":141},[74,1109,1111],{"class":76,"line":1110},28,[74,1112,340],{"class":121},[74,1114,1116],{"class":76,"line":1115},29,[74,1117,107],{"emptyLinePlaceholder":7},[74,1119,1121],{"class":76,"line":1120},30,[74,1122,486],{"class":141},[74,1124,1126],{"class":76,"line":1125},31,[74,1127,107],{"emptyLinePlaceholder":7},[74,1129,1131,1133],{"class":76,"line":1130},32,[74,1132,825],{"class":117},[74,1134,1135],{"class":121},"(canonical_filename);\n",[74,1137,1139,1142,1144,1146],{"class":76,"line":1138},33,[74,1140,1141],{"class":121},"canonical_filename ",[74,1143,160],{"class":80},[74,1145,187],{"class":186},[74,1147,207],{"class":121},[39,1149,1150,1151,1155,1156,1158],{},"Care still must be taken to avoid creating a ",[43,1152,1154],{"href":1153},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fbb-definitions#BB.Definitions-TOCTOU","time-of-check, time-of-use (TOCTOU)"," condition by using ",[71,1157,499],{}," to check a file name.",[349,1160,1162],{"id":1161},"noncompliant-code-example-posix","Noncompliant Code Example (POSIX)",[39,1164,1165,1166,1168,1169,1171,1172,1174,1175,1177,1178,1180],{},"Calling the ",[71,1167,499],{}," function with a non-null ",[71,1170,569],{}," when ",[71,1173,573],{}," is not defined as a constant is not safe. IEEE Std 1003.1, 2013 Edition [ ",[43,1176,508],{"href":507}," ], effectively forbids such uses of ",[71,1179,499],{}," :",[511,1182,1183],{},[39,1184,1185,1186,1188,1189,1192],{},"If ",[49,1187,613],{}," is not a null pointer and {PATH_MAX} is not defined as a constant in the ",[1190,1191,853],"strong",{}," header, the behavior is undefined.",[39,1194,1195],{},"The rationale from IEEE Std 1003.1, 2013 Edition, explains why this case is unsafe:",[511,1197,1198],{},[39,1199,1200,1201,1204,1205,1208,1209,1211,1212,1214,1215,1218,1219,1221,1222,1224,1225,1227,1228,1230,1231,1233],{},"Since ",[49,1202,1203],{},"realpath"," ( ) has no ",[49,1206,1207],{},"length"," argument, if {PATH_MAX} is not defined as a constant in ",[1190,1210,853],{}," , applications have no way of determining how large a buffer they need to allocate for it to be safe to pass to ",[49,1213,1203],{}," ( ). A {PATH_MAX} value obtained from a prior ",[49,1216,1217],{},"pathconf"," ( ) call is out-of-date by the time ",[49,1220,1203],{}," ( ) is called. Hence the only reliable way to use ",[49,1223,1203],{}," ( ) when {PATH_MAX} is not defined in ",[1190,1226,853],{}," is to pass a null pointer for ",[49,1229,613],{}," so that ",[49,1232,1203],{}," ( ) will allocate a buffer of the necessary size.",[39,1235,1236,1238,1239,1242,1243,1246,1247,1249,1250,1252],{},[71,1237,573],{}," can vary among file systems (which is the reason for obtaining it with ",[71,1240,1241],{},"pathconf()"," and not ",[71,1244,1245],{},"sysconf()"," ). A ",[71,1248,573],{}," value obtained from a prior ",[71,1251,1241],{}," call can be invalidated, for example, if a directory in the path is replaced with a symlink to a different file system or if a new file system is mounted somewhere along the path.",[60,1254,1255],{"quality":383},[64,1256,1258],{"className":66,"code":1257,"language":68,"meta":69,"style":69},"char *realpath_res = NULL;\nchar *canonical_filename = NULL;\nsize_t path_size = 0;\nlong pc_result;\n\n\u002F* Verify argv[1] is supplied *\u002F\n\nerrno = 0;\n\n\u002F* Query for PATH_MAX *\u002F\npc_result = pathconf(argv[1], _PC_PATH_MAX);\n\nif ( (pc_result == -1) && (errno != 0) ) {\n  \u002F* Handle error *\u002F\n} else if (pc_result == -1) {\n  \u002F* Handle error *\u002F\n} else if (pc_result \u003C= 0) {\n  \u002F* Handle error *\u002F\n}\npath_size = (size_t)pc_result;\n\nif (path_size > 0) {\n  canonical_filename = malloc(path_size);\n\n  if (canonical_filename == NULL) {\n    \u002F* Handle error *\u002F\n  }\n\n  realpath_res = realpath(argv[1], canonical_filename);\n}\n\nif (realpath_res == NULL) {\n  \u002F* Handle error *\u002F\n}\n\nif (!verify_file(realpath_res)) {\n  \u002F* Handle error *\u002F\n}\n\nif (fopen(realpath_res, \"w\") == NULL) {\n  \u002F* Handle error *\u002F\n}\n\n\u002F* ... *\u002F\n\nfree(canonical_filename);\ncanonical_filename = NULL;\n",[71,1259,1260,1274,1288,1300,1308,1312,1316,1320,1331,1335,1340,1361,1365,1394,1398,1420,1424,1441,1445,1449,1462,1466,1478,1488,1492,1504,1508,1512,1516,1534,1538,1542,1554,1558,1563,1568,1581,1586,1591,1596,1617,1622,1627,1632,1637,1642,1649],{"__ignoreMap":69},[74,1261,1262,1264,1266,1268,1270,1272],{"class":76,"line":77},[74,1263,125],{"class":113},[74,1265,684],{"class":80},[74,1267,687],{"class":121},[74,1269,160],{"class":80},[74,1271,187],{"class":186},[74,1273,207],{"class":121},[74,1275,1276,1278,1280,1282,1284,1286],{"class":76,"line":88},[74,1277,125],{"class":113},[74,1279,684],{"class":80},[74,1281,1141],{"class":121},[74,1283,160],{"class":80},[74,1285,187],{"class":186},[74,1287,207],{"class":121},[74,1289,1290,1292,1294,1296,1298],{"class":76,"line":96},[74,1291,910],{"class":113},[74,1293,913],{"class":121},[74,1295,160],{"class":80},[74,1297,204],{"class":186},[74,1299,207],{"class":121},[74,1301,1302,1305],{"class":76,"line":104},[74,1303,1304],{"class":113},"long",[74,1306,1307],{"class":121}," pc_result;\n",[74,1309,1310],{"class":76,"line":110},[74,1311,107],{"emptyLinePlaceholder":7},[74,1313,1314],{"class":76,"line":138},[74,1315,393],{"class":141},[74,1317,1318],{"class":76,"line":145},[74,1319,107],{"emptyLinePlaceholder":7},[74,1321,1322,1325,1327,1329],{"class":76,"line":174},[74,1323,1324],{"class":121},"errno ",[74,1326,160],{"class":80},[74,1328,204],{"class":186},[74,1330,207],{"class":121},[74,1332,1333],{"class":76,"line":192},[74,1334,107],{"emptyLinePlaceholder":7},[74,1336,1337],{"class":76,"line":198},[74,1338,1339],{"class":141},"\u002F* Query for PATH_MAX *\u002F\n",[74,1341,1342,1345,1347,1350,1352,1354,1356,1358],{"class":76,"line":210},[74,1343,1344],{"class":121},"pc_result ",[74,1346,160],{"class":80},[74,1348,1349],{"class":117}," pathconf",[74,1351,122],{"class":121},[74,1353,416],{"class":415},[74,1355,419],{"class":121},[74,1357,422],{"class":186},[74,1359,1360],{"class":121},"], _PC_PATH_MAX);\n",[74,1362,1363],{"class":76,"line":216},[74,1364,107],{"emptyLinePlaceholder":7},[74,1366,1367,1369,1372,1374,1377,1379,1381,1384,1387,1389,1391],{"class":76,"line":221},[74,1368,402],{"class":80},[74,1370,1371],{"class":121}," ( (pc_result ",[74,1373,183],{"class":80},[74,1375,1376],{"class":80}," -",[74,1378,422],{"class":186},[74,1380,298],{"class":121},[74,1382,1383],{"class":80},"&&",[74,1385,1386],{"class":121}," (errno ",[74,1388,255],{"class":80},[74,1390,204],{"class":186},[74,1392,1393],{"class":121},") ) {\n",[74,1395,1396],{"class":76,"line":241},[74,1397,430],{"class":141},[74,1399,1400,1403,1406,1409,1412,1414,1416,1418],{"class":76,"line":262},[74,1401,1402],{"class":121},"} ",[74,1404,1405],{"class":80},"else",[74,1407,1408],{"class":80}," if",[74,1410,1411],{"class":121}," (pc_result ",[74,1413,183],{"class":80},[74,1415,1376],{"class":80},[74,1417,422],{"class":186},[74,1419,135],{"class":121},[74,1421,1422],{"class":76,"line":271},[74,1423,430],{"class":141},[74,1425,1426,1428,1430,1432,1434,1437,1439],{"class":76,"line":276},[74,1427,1402],{"class":121},[74,1429,1405],{"class":80},[74,1431,1408],{"class":80},[74,1433,1411],{"class":121},[74,1435,1436],{"class":80},"\u003C=",[74,1438,204],{"class":186},[74,1440,135],{"class":121},[74,1442,1443],{"class":76,"line":282},[74,1444,430],{"class":141},[74,1446,1447],{"class":76,"line":312},[74,1448,340],{"class":121},[74,1450,1451,1453,1455,1457,1459],{"class":76,"line":322},[74,1452,936],{"class":121},[74,1454,160],{"class":80},[74,1456,246],{"class":121},[74,1458,910],{"class":113},[74,1460,1461],{"class":121},")pc_result;\n",[74,1463,1464],{"class":76,"line":327},[74,1465,107],{"emptyLinePlaceholder":7},[74,1467,1468,1470,1472,1474,1476],{"class":76,"line":337},[74,1469,402],{"class":80},[74,1471,956],{"class":121},[74,1473,959],{"class":80},[74,1475,204],{"class":186},[74,1477,135],{"class":121},[74,1479,1480,1482,1484,1486],{"class":76,"line":1060},[74,1481,968],{"class":121},[74,1483,160],{"class":80},[74,1485,973],{"class":117},[74,1487,976],{"class":121},[74,1489,1490],{"class":76,"line":1073},[74,1491,107],{"emptyLinePlaceholder":7},[74,1493,1494,1496,1498,1500,1502],{"class":76,"line":1078},[74,1495,177],{"class":80},[74,1497,987],{"class":121},[74,1499,183],{"class":80},[74,1501,187],{"class":186},[74,1503,135],{"class":121},[74,1505,1506],{"class":76,"line":1083},[74,1507,195],{"class":141},[74,1509,1510],{"class":76,"line":1105},[74,1511,213],{"class":121},[74,1513,1514],{"class":76,"line":1110},[74,1515,107],{"emptyLinePlaceholder":7},[74,1517,1518,1520,1522,1524,1526,1528,1530,1532],{"class":76,"line":1115},[74,1519,1010],{"class":121},[74,1521,160],{"class":80},[74,1523,714],{"class":117},[74,1525,122],{"class":121},[74,1527,416],{"class":415},[74,1529,419],{"class":121},[74,1531,422],{"class":186},[74,1533,1025],{"class":121},[74,1535,1536],{"class":76,"line":1120},[74,1537,340],{"class":121},[74,1539,1540],{"class":76,"line":1125},[74,1541,107],{"emptyLinePlaceholder":7},[74,1543,1544,1546,1548,1550,1552],{"class":76,"line":1130},[74,1545,402],{"class":80},[74,1547,736],{"class":121},[74,1549,183],{"class":80},[74,1551,187],{"class":186},[74,1553,135],{"class":121},[74,1555,1556],{"class":76,"line":1138},[74,1557,430],{"class":141},[74,1559,1561],{"class":76,"line":1560},34,[74,1562,340],{"class":121},[74,1564,1566],{"class":76,"line":1565},35,[74,1567,107],{"emptyLinePlaceholder":7},[74,1569,1571,1573,1575,1577,1579],{"class":76,"line":1570},36,[74,1572,402],{"class":80},[74,1574,246],{"class":121},[74,1576,407],{"class":80},[74,1578,410],{"class":117},[74,1580,767],{"class":121},[74,1582,1584],{"class":76,"line":1583},37,[74,1585,430],{"class":141},[74,1587,1589],{"class":76,"line":1588},38,[74,1590,340],{"class":121},[74,1592,1594],{"class":76,"line":1593},39,[74,1595,107],{"emptyLinePlaceholder":7},[74,1597,1599,1601,1603,1605,1607,1609,1611,1613,1615],{"class":76,"line":1598},40,[74,1600,402],{"class":80},[74,1602,246],{"class":121},[74,1604,447],{"class":117},[74,1606,790],{"class":121},[74,1608,461],{"class":84},[74,1610,298],{"class":121},[74,1612,183],{"class":80},[74,1614,187],{"class":186},[74,1616,135],{"class":121},[74,1618,1620],{"class":76,"line":1619},41,[74,1621,430],{"class":141},[74,1623,1625],{"class":76,"line":1624},42,[74,1626,340],{"class":121},[74,1628,1630],{"class":76,"line":1629},43,[74,1631,107],{"emptyLinePlaceholder":7},[74,1633,1635],{"class":76,"line":1634},44,[74,1636,486],{"class":141},[74,1638,1640],{"class":76,"line":1639},45,[74,1641,107],{"emptyLinePlaceholder":7},[74,1643,1645,1647],{"class":76,"line":1644},46,[74,1646,825],{"class":117},[74,1648,1135],{"class":121},[74,1650,1652,1654,1656,1658],{"class":76,"line":1651},47,[74,1653,1141],{"class":121},[74,1655,160],{"class":80},[74,1657,187],{"class":186},[74,1659,207],{"class":121},[1661,1662,1664],"h3",{"id":1663},"implementation-details-linux","Implementation Details (Linux)",[39,1666,343,1667,1670,1671,1674,1675,1677,1678,1682],{},[71,1668,1669],{},"libc4"," and ",[71,1672,1673],{},"libc5"," implementations of ",[71,1676,499],{}," contain a buffer overflow (fixed in libc-5.4.13) [ ",[43,1679,1681],{"href":1680},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-743092","VU#743092"," ]. Consequently, programs need a private version of this function in which this issue is known to be fixed.",[349,1684,1686],{"id":1685},"compliant-solution-glibc","Compliant Solution (glibc)",[39,1688,343,1689,1691,1692,1695,1696,1698,1699,542],{},[71,1690,499],{}," function can be difficult to use and inefficient. Another solution, available as a GNU extension, is ",[71,1693,1694],{},"canonicalize_file_name()"," . This function has the same effect as ",[71,1697,499],{}," , but the result is always returned in a newly allocated buffer [ ",[43,1700,1702],{"href":1701},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-Drepper06","Drepper 2006",[60,1704,1705],{"quality":62},[64,1706,1708],{"className":66,"code":1707,"language":68,"meta":69,"style":69},"\u002F* Verify argv[1] is supplied *\u002F\n\nchar *canonical_filename = canonicalize_file_name(argv[1]);\nif (canonical_filename == NULL) {\n  \u002F* Handle error *\u002F\n}\n\n\u002F* Verify file name *\u002F\n\nif (fopen(canonical_filename, \"w\") == NULL) {\n  \u002F* Handle error *\u002F\n}\n\n\u002F* ... *\u002F\n\nfree(canonical_filename);\ncanonical_filename = NULL;\n",[71,1709,1710,1714,1718,1742,1754,1758,1762,1766,1771,1775,1796,1800,1804,1808,1812,1816,1822],{"__ignoreMap":69},[74,1711,1712],{"class":76,"line":77},[74,1713,393],{"class":141},[74,1715,1716],{"class":76,"line":88},[74,1717,107],{"emptyLinePlaceholder":7},[74,1719,1720,1722,1724,1726,1728,1731,1733,1735,1737,1739],{"class":76,"line":96},[74,1721,125],{"class":113},[74,1723,684],{"class":80},[74,1725,1141],{"class":121},[74,1727,160],{"class":80},[74,1729,1730],{"class":117}," canonicalize_file_name",[74,1732,122],{"class":121},[74,1734,416],{"class":415},[74,1736,419],{"class":121},[74,1738,422],{"class":186},[74,1740,1741],{"class":121},"]);\n",[74,1743,1744,1746,1748,1750,1752],{"class":76,"line":104},[74,1745,402],{"class":80},[74,1747,987],{"class":121},[74,1749,183],{"class":80},[74,1751,187],{"class":186},[74,1753,135],{"class":121},[74,1755,1756],{"class":76,"line":110},[74,1757,430],{"class":141},[74,1759,1760],{"class":76,"line":138},[74,1761,340],{"class":121},[74,1763,1764],{"class":76,"line":145},[74,1765,107],{"emptyLinePlaceholder":7},[74,1767,1768],{"class":76,"line":174},[74,1769,1770],{"class":141},"\u002F* Verify file name *\u002F\n",[74,1772,1773],{"class":76,"line":192},[74,1774,107],{"emptyLinePlaceholder":7},[74,1776,1777,1779,1781,1783,1786,1788,1790,1792,1794],{"class":76,"line":198},[74,1778,402],{"class":80},[74,1780,246],{"class":121},[74,1782,447],{"class":117},[74,1784,1785],{"class":121},"(canonical_filename, ",[74,1787,461],{"class":84},[74,1789,298],{"class":121},[74,1791,183],{"class":80},[74,1793,187],{"class":186},[74,1795,135],{"class":121},[74,1797,1798],{"class":76,"line":210},[74,1799,430],{"class":141},[74,1801,1802],{"class":76,"line":216},[74,1803,340],{"class":121},[74,1805,1806],{"class":76,"line":221},[74,1807,107],{"emptyLinePlaceholder":7},[74,1809,1810],{"class":76,"line":241},[74,1811,486],{"class":141},[74,1813,1814],{"class":76,"line":262},[74,1815,107],{"emptyLinePlaceholder":7},[74,1817,1818,1820],{"class":76,"line":271},[74,1819,825],{"class":117},[74,1821,1135],{"class":121},[74,1823,1824,1826,1828,1830],{"class":76,"line":276},[74,1825,1141],{"class":121},[74,1827,160],{"class":80},[74,1829,187],{"class":186},[74,1831,207],{"class":121},[39,1833,1834,1835,1837],{},"Because memory is allocated by ",[71,1836,1694],{}," , the programmer must remember to free the allocated memory.",[349,1839,1841],{"id":1840},"noncompliant-code-example-windows","Noncompliant Code Example (Windows)",[39,1843,1844,1845,1848,1849,557],{},"This noncompliant code example uses the Windows function ",[71,1846,1847],{},"GetFullPathName()"," for canonicalization [ ",[43,1850,1852],{"href":1851},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-MSDN","MSDN",[60,1854,1855],{"quality":383},[64,1856,1858],{"className":66,"code":1857,"language":68,"meta":69,"style":69},"\u002F* ... *\u002F\n\nenum { INITBUFSIZE = 256 };\nDWORD ret = 0;\nDWORD new_ret = 0;\nchar *canonical_filename;\nchar *new_file;\nchar *file_name;\n\n\u002F* ... *\u002F\n\nfile_name = (char *)malloc(strlen(argv[1])+1);\ncanonical_filename = (char *)malloc(INITBUFSIZE);\n\nif ( (file_name != NULL) && (canonical_filename != NULL) ) {\n  strcpy(file_name, argv[1]);\n  strcpy(canonical_filename, \"\");\n} else {\n  \u002F* Handle error *\u002F\n}\n\nret = GetFullPathName(\n  file_name,\n  INITBUFSIZE,\n  canonical_filename,\n  NULL\n);\n\nif (ret == 0) {\n  \u002F* Handle error *\u002F\n}\nelse if (ret > INITBUFSIZE) {\n  new_file = (char *)realloc(canonical_filename, ret);\n  if (new_file == NULL) {\n    \u002F* Handle error *\u002F\n  }\n\n  canonical_filename = new_file;\n\n  new_ret = GetFullPathName(\n    file_name,\n    ret,\n    canonical_filename,\n    NULL\n  );\n  if (new_ret > ret) {\n    \u002F*\n     * The length of the path changed between calls\n     * to GetFullPathName(); handle error.\n     *\u002F\n  }\n  else if (new_ret == 0) {\n    \u002F* Handle error *\u002F\n  }\n}\n\nif (!verify_file(canonical_filename)) {\n  \u002F* Handle error *\u002F\n}\n\u002F* Verify file name before using *\u002F\n",[71,1859,1860,1864,1868,1884,1895,1906,1915,1924,1933,1937,1941,1945,1986,2005,2009,2032,2048,2059,2068,2072,2076,2080,2093,2098,2103,2108,2113,2117,2121,2134,2138,2142,2155,2176,2189,2193,2197,2201,2210,2214,2225,2230,2235,2240,2245,2250,2262,2267,2273,2279,2285,2290,2306,2311,2316,2321,2326,2340,2345,2350],{"__ignoreMap":69},[74,1861,1862],{"class":76,"line":77},[74,1863,486],{"class":141},[74,1865,1866],{"class":76,"line":88},[74,1867,107],{"emptyLinePlaceholder":7},[74,1869,1870,1873,1876,1878,1881],{"class":76,"line":96},[74,1871,1872],{"class":113},"enum",[74,1874,1875],{"class":121}," { INITBUFSIZE ",[74,1877,160],{"class":80},[74,1879,1880],{"class":186}," 256",[74,1882,1883],{"class":121}," };\n",[74,1885,1886,1889,1891,1893],{"class":76,"line":104},[74,1887,1888],{"class":121},"DWORD ret ",[74,1890,160],{"class":80},[74,1892,204],{"class":186},[74,1894,207],{"class":121},[74,1896,1897,1900,1902,1904],{"class":76,"line":110},[74,1898,1899],{"class":121},"DWORD new_ret ",[74,1901,160],{"class":80},[74,1903,204],{"class":186},[74,1905,207],{"class":121},[74,1907,1908,1910,1912],{"class":76,"line":138},[74,1909,125],{"class":113},[74,1911,684],{"class":80},[74,1913,1914],{"class":121},"canonical_filename;\n",[74,1916,1917,1919,1921],{"class":76,"line":145},[74,1918,125],{"class":113},[74,1920,684],{"class":80},[74,1922,1923],{"class":121},"new_file;\n",[74,1925,1926,1928,1930],{"class":76,"line":174},[74,1927,125],{"class":113},[74,1929,684],{"class":80},[74,1931,1932],{"class":121},"file_name;\n",[74,1934,1935],{"class":76,"line":192},[74,1936,107],{"emptyLinePlaceholder":7},[74,1938,1939],{"class":76,"line":198},[74,1940,486],{"class":141},[74,1942,1943],{"class":76,"line":210},[74,1944,107],{"emptyLinePlaceholder":7},[74,1946,1947,1950,1952,1954,1956,1958,1961,1964,1966,1969,1971,1973,1975,1977,1980,1982,1984],{"class":76,"line":216},[74,1948,1949],{"class":121},"file_name ",[74,1951,160],{"class":80},[74,1953,246],{"class":121},[74,1955,125],{"class":113},[74,1957,684],{"class":80},[74,1959,1960],{"class":121},")",[74,1962,1963],{"class":117},"malloc",[74,1965,122],{"class":121},[74,1967,1968],{"class":117},"strlen",[74,1970,122],{"class":121},[74,1972,416],{"class":415},[74,1974,419],{"class":121},[74,1976,422],{"class":186},[74,1978,1979],{"class":121},"])",[74,1981,306],{"class":80},[74,1983,422],{"class":186},[74,1985,729],{"class":121},[74,1987,1988,1990,1992,1994,1996,1998,2000,2002],{"class":76,"line":221},[74,1989,1141],{"class":121},[74,1991,160],{"class":80},[74,1993,246],{"class":121},[74,1995,125],{"class":113},[74,1997,684],{"class":80},[74,1999,1960],{"class":121},[74,2001,1963],{"class":117},[74,2003,2004],{"class":121},"(INITBUFSIZE);\n",[74,2006,2007],{"class":76,"line":241},[74,2008,107],{"emptyLinePlaceholder":7},[74,2010,2011,2013,2016,2018,2020,2022,2024,2026,2028,2030],{"class":76,"line":262},[74,2012,402],{"class":80},[74,2014,2015],{"class":121}," ( (file_name ",[74,2017,255],{"class":80},[74,2019,187],{"class":186},[74,2021,298],{"class":121},[74,2023,1383],{"class":80},[74,2025,987],{"class":121},[74,2027,255],{"class":80},[74,2029,187],{"class":186},[74,2031,1393],{"class":121},[74,2033,2034,2037,2040,2042,2044,2046],{"class":76,"line":271},[74,2035,2036],{"class":117},"  strcpy",[74,2038,2039],{"class":121},"(file_name, ",[74,2041,416],{"class":415},[74,2043,419],{"class":121},[74,2045,422],{"class":186},[74,2047,1741],{"class":121},[74,2049,2050,2052,2054,2057],{"class":76,"line":276},[74,2051,2036],{"class":117},[74,2053,1785],{"class":121},[74,2055,2056],{"class":84},"\"\"",[74,2058,729],{"class":121},[74,2060,2061,2063,2065],{"class":76,"line":282},[74,2062,1402],{"class":121},[74,2064,1405],{"class":80},[74,2066,2067],{"class":121}," {\n",[74,2069,2070],{"class":76,"line":312},[74,2071,430],{"class":141},[74,2073,2074],{"class":76,"line":322},[74,2075,340],{"class":121},[74,2077,2078],{"class":76,"line":327},[74,2079,107],{"emptyLinePlaceholder":7},[74,2081,2082,2085,2087,2090],{"class":76,"line":337},[74,2083,2084],{"class":121},"ret ",[74,2086,160],{"class":80},[74,2088,2089],{"class":117}," GetFullPathName",[74,2091,2092],{"class":121},"(\n",[74,2094,2095],{"class":76,"line":1060},[74,2096,2097],{"class":121},"  file_name,\n",[74,2099,2100],{"class":76,"line":1073},[74,2101,2102],{"class":121},"  INITBUFSIZE,\n",[74,2104,2105],{"class":76,"line":1078},[74,2106,2107],{"class":121},"  canonical_filename,\n",[74,2109,2110],{"class":76,"line":1083},[74,2111,2112],{"class":186},"  NULL\n",[74,2114,2115],{"class":76,"line":1105},[74,2116,729],{"class":121},[74,2118,2119],{"class":76,"line":1110},[74,2120,107],{"emptyLinePlaceholder":7},[74,2122,2123,2125,2128,2130,2132],{"class":76,"line":1115},[74,2124,402],{"class":80},[74,2126,2127],{"class":121}," (ret ",[74,2129,183],{"class":80},[74,2131,204],{"class":186},[74,2133,135],{"class":121},[74,2135,2136],{"class":76,"line":1120},[74,2137,430],{"class":141},[74,2139,2140],{"class":76,"line":1125},[74,2141,340],{"class":121},[74,2143,2144,2146,2148,2150,2152],{"class":76,"line":1130},[74,2145,1405],{"class":80},[74,2147,1408],{"class":80},[74,2149,2127],{"class":121},[74,2151,959],{"class":80},[74,2153,2154],{"class":121}," INITBUFSIZE) {\n",[74,2156,2157,2160,2162,2164,2166,2168,2170,2173],{"class":76,"line":1138},[74,2158,2159],{"class":121},"  new_file ",[74,2161,160],{"class":80},[74,2163,246],{"class":121},[74,2165,125],{"class":113},[74,2167,684],{"class":80},[74,2169,1960],{"class":121},[74,2171,2172],{"class":117},"realloc",[74,2174,2175],{"class":121},"(canonical_filename, ret);\n",[74,2177,2178,2180,2183,2185,2187],{"class":76,"line":1560},[74,2179,177],{"class":80},[74,2181,2182],{"class":121}," (new_file ",[74,2184,183],{"class":80},[74,2186,187],{"class":186},[74,2188,135],{"class":121},[74,2190,2191],{"class":76,"line":1565},[74,2192,195],{"class":141},[74,2194,2195],{"class":76,"line":1570},[74,2196,213],{"class":121},[74,2198,2199],{"class":76,"line":1583},[74,2200,107],{"emptyLinePlaceholder":7},[74,2202,2203,2205,2207],{"class":76,"line":1588},[74,2204,968],{"class":121},[74,2206,160],{"class":80},[74,2208,2209],{"class":121}," new_file;\n",[74,2211,2212],{"class":76,"line":1593},[74,2213,107],{"emptyLinePlaceholder":7},[74,2215,2216,2219,2221,2223],{"class":76,"line":1598},[74,2217,2218],{"class":121},"  new_ret ",[74,2220,160],{"class":80},[74,2222,2089],{"class":117},[74,2224,2092],{"class":121},[74,2226,2227],{"class":76,"line":1619},[74,2228,2229],{"class":121},"    file_name,\n",[74,2231,2232],{"class":76,"line":1624},[74,2233,2234],{"class":121},"    ret,\n",[74,2236,2237],{"class":76,"line":1629},[74,2238,2239],{"class":121},"    canonical_filename,\n",[74,2241,2242],{"class":76,"line":1634},[74,2243,2244],{"class":186},"    NULL\n",[74,2246,2247],{"class":76,"line":1639},[74,2248,2249],{"class":121},"  );\n",[74,2251,2252,2254,2257,2259],{"class":76,"line":1644},[74,2253,177],{"class":80},[74,2255,2256],{"class":121}," (new_ret ",[74,2258,959],{"class":80},[74,2260,2261],{"class":121}," ret) {\n",[74,2263,2264],{"class":76,"line":1651},[74,2265,2266],{"class":141},"    \u002F*\n",[74,2268,2270],{"class":76,"line":2269},48,[74,2271,2272],{"class":141},"     * The length of the path changed between calls\n",[74,2274,2276],{"class":76,"line":2275},49,[74,2277,2278],{"class":141},"     * to GetFullPathName(); handle error.\n",[74,2280,2282],{"class":76,"line":2281},50,[74,2283,2284],{"class":141},"     *\u002F\n",[74,2286,2288],{"class":76,"line":2287},51,[74,2289,213],{"class":121},[74,2291,2293,2296,2298,2300,2302,2304],{"class":76,"line":2292},52,[74,2294,2295],{"class":80},"  else",[74,2297,1408],{"class":80},[74,2299,2256],{"class":121},[74,2301,183],{"class":80},[74,2303,204],{"class":186},[74,2305,135],{"class":121},[74,2307,2309],{"class":76,"line":2308},53,[74,2310,195],{"class":141},[74,2312,2314],{"class":76,"line":2313},54,[74,2315,213],{"class":121},[74,2317,2319],{"class":76,"line":2318},55,[74,2320,340],{"class":121},[74,2322,2324],{"class":76,"line":2323},56,[74,2325,107],{"emptyLinePlaceholder":7},[74,2327,2329,2331,2333,2335,2337],{"class":76,"line":2328},57,[74,2330,402],{"class":80},[74,2332,246],{"class":121},[74,2334,407],{"class":80},[74,2336,410],{"class":117},[74,2338,2339],{"class":121},"(canonical_filename)) {\n",[74,2341,2343],{"class":76,"line":2342},58,[74,2344,430],{"class":141},[74,2346,2348],{"class":76,"line":2347},59,[74,2349,340],{"class":121},[74,2351,2353],{"class":76,"line":2352},60,[74,2354,2355],{"class":141},"\u002F* Verify file name before using *\u002F\n",[39,2357,343,2358,2360,2361,1670,2363,2366,2367,2369],{},[71,2359,1847],{}," function can be used to eliminate the ",[71,2362,528],{},[71,2364,2365],{},"\u002F.\u002F"," components from a path name, but there are numerous other canonicalization issues that are not addressed by use of ",[71,2368,1847],{}," , including universal naming convention (UNC) shares, short (8.3) names, long names, Unicode names, trailing dots, forward slashes, backslashes, short cuts, and so on.",[39,2371,2372,2373,1155,2376,1158],{},"Care also must be taken to avoid creating a ",[43,2374,2375],{"href":1153},"TOCTOU",[71,2377,1847],{},[349,2379,2381],{"id":2380},"compliant-solution-windows","Compliant Solution (Windows)",[39,2383,2384,2385,2389],{},"Producing canonical file names for Windows operating systems is extremely complex and beyond the scope of this standard. The best advice is to try to avoid making decisions based on a path, directory, or file name [ ",[43,2386,2388],{"href":2387},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-Howard02","Howard 2002"," ]. Alternatively, use operating-system-based mechanisms, such as access control lists (ACLs) or other authorization techniques.",[349,2391,2393],{"id":2392},"risk-assessment","Risk Assessment",[39,2395,2396,2397,2401,2402,2406],{},"File-related ",[43,2398,2400],{"href":2399},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fbb-definitions#BB.Definitions-vulnerability","vulnerabilities"," can often be ",[43,2403,2405],{"href":2404},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fbb-definitions#BB.Definitions-exploit","exploited"," to cause a program with elevated privileges to access an unintended file. Canonicalizing a file path makes it easier to identify the reference file object.",[2408,2409,2410,2411,2410,2441],"table",{},"\n  ",[2412,2413,2414,2415,2410],"thead",{},"\n    ",[2416,2417,2418,2419,2418,2423,2418,2426,2418,2429,2418,2432,2418,2435,2418,2438,2414],"tr",{},"\n      ",[2420,2421,2422],"th",{},"Recommendation",[2420,2424,2425],{},"Severity",[2420,2427,2428],{},"Likelihood",[2420,2430,2431],{},"Detectable",[2420,2433,2434],{},"Repairable",[2420,2436,2437],{},"Priority",[2420,2439,2440],{},"Level",[2442,2443,2414,2444,2410],"tbody",{},[2416,2445,2418,2446,2418,2450,2418,2453,2418,2456,2418,2459,2418,2461,2418,2468,2414],{},[2447,2448,2449],"td",{},"FIO02-C",[2447,2451,2452],{},"Medium",[2447,2454,2455],{},"Probable",[2447,2457,2458],{},"No",[2447,2460,2458],{},[2447,2462,2464],{"style":2463},"color: #27ae60;",[2465,2466,2467],"b",{},"P4",[2447,2469,2470],{"style":2463},[2465,2471,2472],{},"L3",[1661,2474,2476],{"id":2475},"automated-detection","Automated Detection",[2408,2478,2481],{"className":2479},[2480],"wrapped",[2442,2482,2483,2507,2535,2583,2631,2661,2688],{},[2416,2484,2487,2492,2497,2502],{"className":2485},[2486],"header",[2420,2488,2489],{},[39,2490,2491],{},"Tool",[2420,2493,2494],{},[39,2495,2496],{},"Version",[2420,2498,2499],{},[39,2500,2501],{},"Checker",[2420,2503,2504],{},[39,2505,2506],{},"Description",[2416,2508,2511,2517,2525,2530],{"className":2509},[2510],"odd",[2447,2512,2513],{},[43,2514,2516],{"href":2515},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcodesonar","CodeSonar",[2447,2518,2519],{},[2520,2521,2524],"div",{"className":2522},[2523],"content-wrapper","9.1p0",[2447,2526,2527],{},[1190,2528,2529],{},"IO.TAINT.FNAME",[2447,2531,2532],{},[39,2533,2534],{},"Tainted Filename",[2416,2536,2539,2545,2552,2558],{"className":2537},[2538],"even",[2447,2540,2541],{},[43,2542,2544],{"href":2543},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Frose","Compass\u002FROSE",[2447,2546,2547],{},[39,2548,2549],{},[2550,2551],"br",{},[2447,2553,2554],{},[39,2555,2556],{},[2550,2557],{},[2447,2559,2560],{},[39,2561,2562,2563,2566,2567,2570,2571,2566,2574,2577,2578,2566,2580,2582],{},"Could catch violations of this rule by enforcing that any call to ",[71,2564,2565],{},"       open()      "," or ",[71,2568,2569],{},"       fopen()      "," is preceded by a canonicalization routine—that is, a call to ",[71,2572,2573],{},"       realpath()      ",[71,2575,2576],{},"       canonicalize_file_name()      "," . This call will catch some false positives, as ROSE cannot tell when canonicalization is warranted. False positives can be reduced (but not eliminated) by only reporting instances of ",[71,2579,2569],{},[71,2581,2565],{}," where the file name string has some other processing done to it. This reflects the fact that canonicalization is only necessary for doing verification based on the file name string",[2416,2584,2586,2592,2600,2627],{"className":2585},[2510],[2447,2587,2588],{},[43,2589,2591],{"href":2590},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fhelix-qac","Helix QAC",[2447,2593,2594],{},[2520,2595,2597],{"className":2596},[2523],[39,2598,2599],{},"2025.2",[2447,2601,2602],{},[39,2603,2604,2607,2609,2612,2614,2617,2619,2622,2624],{},[1190,2605,2606],{},"C5047",[2550,2608],{},[1190,2610,2611],{},"C1611",[2550,2613],{},[1190,2615,2616],{},"C1612",[2550,2618],{},[1190,2620,2621],{},"C1613",[2550,2623],{},[1190,2625,2626],{},"C3519",[2447,2628,2629],{},[2550,2630],{},[2416,2632,2634,2640,2645,2655],{"className":2633},[2538],[2447,2635,2636],{},[43,2637,2639],{"href":2638},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fklocwork","Klocwork",[2447,2641,2642],{},[2520,2643,2599],{"className":2644},[2523],[2447,2646,2647],{},[39,2648,2649],{},[1190,2650,2651,2652,2654],{},"SV.DLLPRELOAD.NONABSOLUTE.DLL",[2550,2653],{},"\nSV.TOCTOU.FILE_ACCESS",[2447,2656,2657],{},[39,2658,2659],{},[2550,2660],{},[2416,2662,2664,2670,2676,2683],{"className":2663},[2510],[2447,2665,2666],{},[43,2667,2669],{"href":2668},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fldra","LDRA tool suite",[2447,2671,2672],{},[2520,2673,2675],{"className":2674},[2523],"9.7.1",[2447,2677,2678],{},[39,2679,2680],{},[1190,2681,2682],{},"85 D",[2447,2684,2685],{},[39,2686,2687],{},"Partially implemented",[2416,2689,2691,2697,2705,2711],{"className":2690},[2538],[2447,2692,2693],{},[43,2694,2696],{"href":2695},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fpolyspace-bug-finder","Polyspace Bug Finder",[2447,2698,2699],{},[2520,2700,2702],{"className":2701},[2523],[39,2703,2704],{},"R2025b",[2447,2706,2707],{},[43,2708,2710],{"href":2709},"https:\u002F\u002Fwww.mathworks.com\u002Fhelp\u002Fbugfinder\u002Fref\u002Fcertcrec.fio02c.html","CERT C: Rec. FIO02-C",[2447,2712,2713],{},[39,2714,2715],{},"Checks for vulnerable path manipulation (rule fully covered)",[349,2717,2719],{"id":2718},"related-vulnerabilities","Related Vulnerabilities",[39,2721,2722,2727,2728,2731,2732,2735,2736,542],{},[43,2723,2726],{"href":2724,"rel":2725},"http:\u002F\u002Fweb.nvd.nist.gov\u002Fview\u002Fvuln\u002Fdetail?vulnId=CVE-2009-1760",[537],"CVE-2009-1760"," results from a violation of this recommendation. Until version 0.4.13, ",[71,2729,2730],{},"libtorrent"," attempts to rule out unsafe file paths by checking only against the ",[71,2733,2734],{},"\"..\""," string. An attacker can exploit this to access any file on the system by using more complex relative paths [ ",[43,2737,2740],{"href":2738,"rel":2739},"http:\u002F\u002Fxorl.wordpress.com\u002F2009\u002F06\u002F09\u002Fcve-2009-1760-libtorrent-arbitrary-file-overwrite\u002F",[537],"xorl 2009",[39,2742,2743,2748,2749,2753,2754,2759],{},[43,2744,2747],{"href":2745,"rel":2746},"https:\u002F\u002Faccess.redhat.com\u002Fsecurity\u002Fcve\u002FCVE-2014-9390",[537],"CVE-2014-9390"," results from a violation of this recommendation. When git is used on a case-insensitive file system (e.g., NTFS under Windows, HFS+ under Mac OS X), a file named \".Git\u002Fconfig\" in the repository would overwrite the user's local \".git\u002Fconfig\" file.  This config file can define external commands (e.g., a custom diff utility), and it can lead to arbitrary code execution.  The commit that fixes this vulnerability is ",[43,2750,2751],{"href":2751,"rel":2752},"https:\u002F\u002Fgithub.com\u002Fgit\u002Fgit\u002Fcommit\u002F77933f4449b8d6aa7529d627f3c7b55336f491db",[537]," .  The ",[43,2755,2758],{"href":2756,"rel":2757},"https:\u002F\u002Fgithub.com\u002Fgit\u002Fgit\u002Fblob\u002Fmaster\u002FDocumentation\u002FRelNotes\u002F1.8.5.6.txt",[537],"release notes"," briefly discuss other canonicalization issues, in addition to case-insensitiivity, under Windows and Mac OS X.",[39,2761,2762,2763,2765,2766,2771],{},"Search for ",[43,2764,2400],{"href":2399}," resulting from the violation of this rule on the ",[43,2767,2770],{"href":2768,"rel":2769},"https:\u002F\u002Fwww.kb.cert.org\u002Fvulnotes\u002Fbymetric?searchview&query=FIELD+KEYWORDS+contains+FIO02-C",[537],"CERT website"," .",[349,2773,2775],{"id":2774},"related-guidelines","Related Guidelines",[2408,2777,2779,2788],{"className":2778},[2480],[2780,2781,2782,2786],"colgroup",{},[2783,2784],"col",{"style":2785},"width: 50%",[2783,2787],{"style":2785},[2442,2789,2790,2804,2818,2830],{},[2416,2791,2793,2798],{"className":2792},[2510],[2447,2794,2795],{},[43,2796,2797],{"href":20},"SEI CERT C++ Coding Standard",[2447,2799,2800],{},[43,2801,2803],{"href":2802},"\u002Fsei-cert-cpp-coding-standard\u002Fthe-void\u002Fvoid-3-recommendations\u002Fvoid-rec-07-input-output-fio\u002Fvoid-fio02-cpp-canonicalize-path-names-originating-from-untrusted-sources","VOID FIO02-CPP. Canonicalize path names originating from untrusted sources",[2416,2805,2807,2812],{"className":2806},[2538],[2447,2808,2809],{},[43,2810,2811],{"href":23},"CERT Oracle Secure Coding Standard for Java",[2447,2813,2814],{},[43,2815,2817],{"href":2816},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio16-j","FIO16-J. Canonicalize path names before validating them",[2416,2819,2821,2827],{"className":2820},[2510],[2447,2822,2823],{},[43,2824,2826],{"href":2825},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-ISO-IECTR24772-2013","ISO\u002FIEC TR 24772:2013",[2447,2828,2829],{},"Path Traversal [EWR]",[2416,2831,2833,2839],{"className":2832},[2538],[2447,2834,2835],{},[43,2836,2838],{"href":2837},"http:\u002F\u002Fcwe.mitre.org\u002F","MITRE CWE",[2447,2840,2841],{},[39,2842,2843,2847,2848,2850,2854,2855,2857,2861,2862,2864,2868,2869,2871,2875,2876,2878,2882,2883,2885,2889],{},[43,2844,2846],{"href":2845},"http:\u002F\u002Fcwe.mitre.org\u002Fdata\u002Fdefinitions\u002F22.html","CWE-22"," , Path traversal",[2550,2849],{},[43,2851,2853],{"href":2852},"https:\u002F\u002Fcwe.mitre.org\u002Fdata\u002Fdefinitions\u002F23.html","CWE-23"," , Relative Path Traversal",[2550,2856],{},[43,2858,2860],{"href":2859},"https:\u002F\u002Fcwe.mitre.org\u002Fdata\u002Fdefinitions\u002F28.html","CWE-28"," , Path Traversal: '..\\filedir'",[2550,2863],{},[43,2865,2867],{"href":2866},"https:\u002F\u002Fcwe.mitre.org\u002Fdata\u002Fdefinitions\u002F40.html","CWE-40"," , Path Traversal: '\\\\UNC\\share\\name\\' (Windows UNC Share)",[2550,2870],{},[43,2872,2874],{"href":2873},"http:\u002F\u002Fcwe.mitre.org\u002Fdata\u002Fdefinitions\u002F41.html","CWE-41"," , Failure to resolve path equivalence",[2550,2877],{},[43,2879,2881],{"href":2880},"http:\u002F\u002Fcwe.mitre.org\u002Fdata\u002Fdefinitions\u002F59.html","CWE-59"," , Failure to resolve links before file access (aka \"link following\")",[2550,2884],{},[43,2886,2888],{"href":2887},"http:\u002F\u002Fcwe.mitre.org\u002Fdata\u002Fdefinitions\u002F73.html","CWE-73"," , External control of file name or path",[349,2891,2893],{"id":2892},"bibliography","Bibliography",[2408,2895,2897,2903],{"className":2896},[2480],[2780,2898,2899,2901],{},[2783,2900],{"style":2785},[2783,2902],{"style":2785},[2442,2904,2905,2917,2927,2950,2968,2987,2999,3010],{},[2416,2906,2908,2914],{"className":2907},[2510],[2447,2909,2910,2911,2913],{},"[ ",[43,2912,1702],{"href":1701}," ]",[2447,2915,2916],{},"Section 2.1.2, \"Implicit Memory Allocation\"",[2416,2918,2920,2924],{"className":2919},[2538],[2447,2921,2910,2922,2913],{},[43,2923,2388],{"href":2387},[2447,2925,2926],{},"Chapter 11, \"Canonical Representation Issues\"",[2416,2928,2930,2934],{"className":2929},[2510],[2447,2931,2910,2932,2913],{},[43,2933,556],{"href":555},[2447,2935,2936,2942,2944],{},[43,2937,2939],{"href":2938},"http:\u002F\u002Fwww.kernel.org\u002Fdoc\u002Fman-pages\u002Fonline\u002Fpages\u002Fman3\u002Frealpath.3.html",[71,2940,2941],{},"       realpath(3)      ",[2550,2943],{},[43,2945,2947],{"href":2946},"http:\u002F\u002Fwww.kernel.org\u002Fdoc\u002Fman-pages\u002Fonline\u002Fpages\u002Fman3\u002Fpathconf.3.html",[71,2948,2949],{},"       pathconf(3)      ",[2416,2951,2953,2957],{"className":2952},[2538],[2447,2954,2910,2955,2913],{},[43,2956,1852],{"href":1851},[2447,2958,2959,2960,2967],{},"\" ",[43,2961,2963,2966],{"href":2962},"http:\u002F\u002Fmsdn.microsoft.com\u002Fen-us\u002Flibrary\u002Faa364963.aspx",[71,2964,2965],{},"       GetFullPathName      "," Function"," \"",[2416,2969,2971,2975],{"className":2970},[2510],[2447,2972,2910,2973,2913],{},[43,2974,508],{"href":507},[2447,2976,2977,2981,2983,2984],{},[43,2978,2980],{"href":2979},"http:\u002F\u002Fpubs.opengroup.org\u002Fonlinepubs\u002F9699919799\u002F","Section 4.12, \"Pathname Resolution\"",[2550,2982],{},"\nSystem Interfaces: ",[71,2985,2986],{},"             realpath           ",[2416,2988,2990,2996],{"className":2989},[2538],[2447,2991,2910,2992,2913],{},[43,2993,2995],{"href":2994},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-Seacord2013","Seacord 2013",[2447,2997,2998],{},"Chapter 8, \"File I\u002FO\"",[2416,3000,3002,3006],{"className":3001},[2510],[2447,3003,2910,3004,2913],{},[43,3005,1681],{"href":1680},[2447,3007,3008],{},[2550,3009],{},[2416,3011,3013,3018],{"className":3012},[2538],[2447,3014,2910,3015,2913],{},[43,3016,2740],{"href":3017},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-xorl2009",[2447,3019,3020],{},[43,3021,3022],{"href":2738},"CVE-2009-1760: libtorrent Arbitrary File Overwrite",[3024,3025],"hr",{},[39,3027,3028,3035,3036,3035,3042],{},[43,3029,3031],{"href":3030},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio01-c",[3032,3033],"img",{"src":3034},"\u002Fattachments\u002F87152044\u002F88034188.png"," ",[43,3037,3039],{"href":3038},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002F",[3032,3040],{"src":3041},"\u002Fattachments\u002F87152044\u002F88034190.png",[43,3043,3045],{"href":3044},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio03-c",[3032,3046],{"src":3047},"\u002Fattachments\u002F87152044\u002F88034189.png",[349,3049,3051],{"id":3050},"attachments","Attachments:",[2520,3053,3057],{"className":3054,"align":3056},[3055],"greybox","left",[39,3058,3059,3035,3062,3067],{},[3032,3060],{"alt":69,"src":3061},"images\u002Ficons\u002Fbullet_blue.gif",[43,3063,3066],{"href":3064,"target":3065},"\u002Fattachments\u002F87152398\u002F88025673.c","_blank","fio02.c"," (text\u002Fx-csrc)",[3069,3070,3071],"style",{},"html pre.shiki code .sC2Qs, html code.shiki .sC2Qs{--shiki-default:#D73A49;--shiki-dark:#F97583;--shiki-sepia:#F92672}html pre.shiki code .sstjo, html code.shiki .sstjo{--shiki-default:#032F62;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74}html pre.shiki code .sq6CD, html code.shiki .sq6CD{--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit;--shiki-sepia:#66D9EF;--shiki-sepia-font-style:italic}html pre.shiki code .srTi1, html code.shiki .srTi1{--shiki-default:#6F42C1;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E}html pre.shiki code .sMOD_, html code.shiki .sMOD_{--shiki-default:#24292E;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .sTHNf, html code.shiki .sTHNf{--shiki-default:#E36209;--shiki-default-font-style:inherit;--shiki-dark:#FFAB70;--shiki-dark-font-style:inherit;--shiki-sepia:#FD971F;--shiki-sepia-font-style:italic}html pre.shiki code .s8-w5, html code.shiki .s8-w5{--shiki-default:#6A737D;--shiki-dark:#6A737D;--shiki-sepia:#88846F}html pre.shiki code .s7F3e, html code.shiki .s7F3e{--shiki-default:#005CC5;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html pre.shiki code .sOrwc, html code.shiki .sOrwc{--shiki-default:#E36209;--shiki-dark:#FFAB70;--shiki-sepia:#F8F8F2}",{"title":69,"searchDepth":88,"depth":88,"links":3073},[3074,3075,3076,3079,3080,3081,3082,3085,3086,3087,3088],{"id":351,"depth":88,"text":352},{"id":489,"depth":88,"text":490},{"id":1161,"depth":88,"text":1162,"children":3077},[3078],{"id":1663,"depth":96,"text":1664},{"id":1685,"depth":88,"text":1686},{"id":1840,"depth":88,"text":1841},{"id":2380,"depth":88,"text":2381},{"id":2392,"depth":88,"text":2393,"children":3083},[3084],{"id":2475,"depth":96,"text":2476},{"id":2718,"depth":88,"text":2719},{"id":2774,"depth":88,"text":2775},{"id":2892,"depth":88,"text":2893},{"id":3050,"depth":88,"text":3051},"Path names, directory names, and file names may contain characters that make validation difficult and inaccurate. Furthermore, any path name component can be a symbolic link, which further obscures the actual location or identity of a file. To simplify file name validation, it is recommended that names be translated into their canonical form. Canonicalizing file names makes it much easier to verify a path, directory, or file name by making it easier to compare names.","md",{"tags":3092},[3093,3094,3095,3096,3097,3098,3099,3100,3101,3102,3103,3104],"klocwork","recommendation","cwe-73","input","compass\u002Frose","android-unknown","windows","filename","cwe-22","fio","rose-false-positive","posix","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio02-c",{"title":30,"description":3089},"4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F03.fio02-c","T9ASwhyjxksy6CErS8w-l1UkBPxDoReX2OvybZRuaZI",[3110,3113],{"title":3111,"path":3030,"stem":3112,"children":-1},"FIO01-C. Be careful using functions that use file names for identification","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F02.fio01-c",{"title":3114,"path":3044,"stem":3115,"children":-1},"FIO03-C. Do not make assumptions about fopen() and file creation","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F04.fio03-c",[3117],{"title":3118,"path":3119,"stem":3120,"children":3121},"SEI CERT C Coding Standard","\u002Fsei-cert-c-coding-standard","4.sei-cert-c-coding-standard\u002F01.index",[3122,3123,3195,3785,4071,4085,4089,4093,4097,4903],{"title":3118,"path":3119,"stem":3120},{"title":3124,"path":3125,"stem":3126,"children":3127},"Front Matter","\u002Fsei-cert-c-coding-standard\u002Ffront-matter","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F1.index",[3128,3129],{"title":3124,"path":3125,"stem":3126},{"title":3130,"path":3131,"stem":3132,"children":3133},"Introduction","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F01.index",[3134,3135,3139,3143,3147,3151,3155,3159,3163,3167,3171,3175,3179,3183,3187,3191],{"title":3130,"path":3131,"stem":3132},{"title":3136,"path":3137,"stem":3138},"Scope","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fscope","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F01.scope",{"title":3140,"path":3141,"stem":3142},"Audience","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Faudience","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F02.audience",{"title":3144,"path":3145,"stem":3146},"How this Coding Standard is Organized","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fhow-this-coding-standard-is-organized","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F03.how-this-coding-standard-is-organized",{"title":3148,"path":3149,"stem":3150},"History","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fhistory","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F04.history",{"title":3152,"path":3153,"stem":3154},"ISO\u002FIEC TS 17961 C Secure Coding Rules","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fisoiec-ts-17961-c-secure-coding-rules","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F05.isoiec-ts-17961-c-secure-coding-rules",{"title":3156,"path":3157,"stem":3158},"Tool Selection and Validation","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Ftool-selection-and-validation","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F06.tool-selection-and-validation",{"title":3160,"path":3161,"stem":3162},"Taint Analysis","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Ftaint-analysis","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F07.taint-analysis",{"title":3164,"path":3165,"stem":3166},"Rules versus Recommendations","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Frules-versus-recommendations","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F08.rules-versus-recommendations",{"title":3168,"path":3169,"stem":3170},"Conformance Testing","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fconformance-testing","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F09.conformance-testing",{"title":3172,"path":3173,"stem":3174},"Development Process","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fdevelopment-process","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F10.development-process",{"title":3176,"path":3177,"stem":3178},"Usage","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fusage","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F11.usage",{"title":3180,"path":3181,"stem":3182},"System Qualities","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fsystem-qualities","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F12.system-qualities",{"title":3184,"path":3185,"stem":3186},"Automatically Generated Code","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fautomatically-generated-code","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F13.automatically-generated-code",{"title":3188,"path":3189,"stem":3190},"Government Regulations","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fgovernment-regulations","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F14.government-regulations",{"title":3192,"path":3193,"stem":3194},"Acknowledgments","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Facknowledgments","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F15.acknowledgments",{"title":3196,"path":3197,"stem":3198,"children":3199},"Rules","\u002Fsei-cert-c-coding-standard\u002Frules","4.sei-cert-c-coding-standard\u002F03.rules\u002F01.index",[3200,3201,3205,3235,3265,3327,3365,3391,3413,3479,3505,3563,3597,3627,3637,3675,3745,3763],{"title":3196,"path":3197,"stem":3198},{"title":3202,"path":3203,"stem":3204},"Application Programming Interfaces (API)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fapplication-programming-interfaces-api","4.sei-cert-c-coding-standard\u002F03.rules\u002F02.application-programming-interfaces-api",{"title":3206,"path":3207,"stem":3208,"children":3209},"Arrays (ARR)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Farrays-arr","4.sei-cert-c-coding-standard\u002F03.rules\u002F03.arrays-arr\u002F1.index",[3210,3211,3215,3219,3223,3227,3231],{"title":3206,"path":3207,"stem":3208},{"title":3212,"path":3213,"stem":3214},"ARR30-C. Do not form or use out-of-bounds pointers or array subscripts","\u002Fsei-cert-c-coding-standard\u002Frules\u002Farrays-arr\u002Farr30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F03.arrays-arr\u002F2.arr30-c",{"title":3216,"path":3217,"stem":3218},"ARR32-C. Ensure size arguments for variable length arrays are in a valid range","\u002Fsei-cert-c-coding-standard\u002Frules\u002Farrays-arr\u002Farr32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F03.arrays-arr\u002F3.arr32-c",{"title":3220,"path":3221,"stem":3222},"ARR36-C. Do not subtract or compare two pointers that do not refer to the same array","\u002Fsei-cert-c-coding-standard\u002Frules\u002Farrays-arr\u002Farr36-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F03.arrays-arr\u002F4.arr36-c",{"title":3224,"path":3225,"stem":3226},"ARR37-C. Do not add or subtract an integer to a pointer to a non-array object","\u002Fsei-cert-c-coding-standard\u002Frules\u002Farrays-arr\u002Farr37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F03.arrays-arr\u002F5.arr37-c",{"title":3228,"path":3229,"stem":3230},"ARR38-C. Guarantee that library functions do not form invalid pointers","\u002Fsei-cert-c-coding-standard\u002Frules\u002Farrays-arr\u002Farr38-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F03.arrays-arr\u002F6.arr38-c",{"title":3232,"path":3233,"stem":3234},"ARR39-C. Do not add or subtract a scaled integer to a pointer","\u002Fsei-cert-c-coding-standard\u002Frules\u002Farrays-arr\u002Farr39-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F03.arrays-arr\u002F7.arr39-c",{"title":3236,"path":3237,"stem":3238,"children":3239},"Characters and Strings (STR)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fcharacters-and-strings-str","4.sei-cert-c-coding-standard\u002F03.rules\u002F04.characters-and-strings-str\u002F1.index",[3240,3241,3245,3249,3253,3257,3261],{"title":3236,"path":3237,"stem":3238},{"title":3242,"path":3243,"stem":3244},"STR30-C. Do not attempt to modify string literals","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fcharacters-and-strings-str\u002Fstr30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F04.characters-and-strings-str\u002F2.str30-c",{"title":3246,"path":3247,"stem":3248},"STR31-C. Guarantee that storage for strings has sufficient space for character data and the null terminator","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fcharacters-and-strings-str\u002Fstr31-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F04.characters-and-strings-str\u002F3.str31-c",{"title":3250,"path":3251,"stem":3252},"STR32-C. Do not pass a non-null-terminated character sequence to a library function that expects a string","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fcharacters-and-strings-str\u002Fstr32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F04.characters-and-strings-str\u002F4.str32-c",{"title":3254,"path":3255,"stem":3256},"STR34-C. Cast characters to unsigned char before converting to larger integer sizes","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fcharacters-and-strings-str\u002Fstr34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F04.characters-and-strings-str\u002F5.str34-c",{"title":3258,"path":3259,"stem":3260},"STR37-C. Arguments to character-handling functions must be representable as an unsigned char","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fcharacters-and-strings-str\u002Fstr37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F04.characters-and-strings-str\u002F6.str37-c",{"title":3262,"path":3263,"stem":3264},"STR38-C. Do not confuse narrow and wide character strings and functions","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fcharacters-and-strings-str\u002Fstr38-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F04.characters-and-strings-str\u002F7.str38-c",{"title":3266,"path":3267,"stem":3268,"children":3269},"Concurrency (CON)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F01.index",[3270,3271,3275,3279,3283,3287,3291,3295,3299,3303,3307,3311,3315,3319,3323],{"title":3266,"path":3267,"stem":3268},{"title":3272,"path":3273,"stem":3274},"CON30-C. Clean up thread-specific storage","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F02.con30-c",{"title":3276,"path":3277,"stem":3278},"CON31-C. Do not destroy a mutex while it is locked","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon31-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F03.con31-c",{"title":3280,"path":3281,"stem":3282},"CON32-C. Prevent data races when accessing bit-fields from multiple threads","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F04.con32-c",{"title":3284,"path":3285,"stem":3286},"CON33-C. Avoid race conditions when using library functions","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon33-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F05.con33-c",{"title":3288,"path":3289,"stem":3290},"CON34-C. Declare objects shared between threads with appropriate storage durations","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F06.con34-c",{"title":3292,"path":3293,"stem":3294},"CON35-C. Avoid deadlock by locking in a predefined order","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon35-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F07.con35-c",{"title":3296,"path":3297,"stem":3298},"CON36-C. Wrap functions that can spuriously wake up in a loop","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon36-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F08.con36-c",{"title":3300,"path":3301,"stem":3302},"CON37-C. Do not call signal() in a multithreaded program","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F09.con37-c",{"title":3304,"path":3305,"stem":3306},"CON38-C. Preserve thread safety and liveness when using condition variables","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon38-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F10.con38-c",{"title":3308,"path":3309,"stem":3310},"CON39-C. Do not join or detach a thread that was previously joined or detached","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon39-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F11.con39-c",{"title":3312,"path":3313,"stem":3314},"CON40-C. Do not refer to an atomic variable twice in an expression","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon40-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F12.con40-c",{"title":3316,"path":3317,"stem":3318},"CON41-C. Wrap functions that can fail spuriously in a loop","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon41-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F13.con41-c",{"title":3320,"path":3321,"stem":3322},"CON42-C. Don't allow attackers to influence environment variables that control concurrency parameters","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon42-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F14.con42-c",{"title":3324,"path":3325,"stem":3326},"CON43-C. Do not allow data races in multithreaded code","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon43-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F15.con43-c",{"title":3328,"path":3329,"stem":3330,"children":3331},"Declarations and Initialization (DCL)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F1.index",[3332,3333,3337,3341,3345,3349,3353,3357,3361],{"title":3328,"path":3329,"stem":3330},{"title":3334,"path":3335,"stem":3336},"DCL30-C. Declare objects with appropriate storage durations","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F2.dcl30-c",{"title":3338,"path":3339,"stem":3340},"DCL31-C. Declare identifiers before using them","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl31-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F3.dcl31-c",{"title":3342,"path":3343,"stem":3344},"DCL36-C. Do not declare an identifier with conflicting linkage classifications","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl36-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F4.dcl36-c",{"title":3346,"path":3347,"stem":3348},"DCL37-C. Do not declare or define a reserved identifier","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F5.dcl37-c",{"title":3350,"path":3351,"stem":3352},"DCL38-C. Use the correct syntax when declaring a flexible array member","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl38-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F6.dcl38-c",{"title":3354,"path":3355,"stem":3356},"DCL39-C. Avoid information leakage when passing a structure across a trust boundary","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl39-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F7.dcl39-c",{"title":3358,"path":3359,"stem":3360},"DCL40-C. Do not create incompatible declarations of the same function or object","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl40-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F8.dcl40-c",{"title":3362,"path":3363,"stem":3364},"DCL41-C. Do not declare variables inside a switch statement before the first case label","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl41-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F9.dcl41-c",{"title":3366,"path":3367,"stem":3368,"children":3369},"Environment (ENV)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fenvironment-env","4.sei-cert-c-coding-standard\u002F03.rules\u002F07.environment-env\u002F1.index",[3370,3371,3375,3379,3383,3387],{"title":3366,"path":3367,"stem":3368},{"title":3372,"path":3373,"stem":3374},"ENV30-C. Do not modify the object referenced by the return value of certain functions","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fenvironment-env\u002Fenv30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F07.environment-env\u002F2.env30-c",{"title":3376,"path":3377,"stem":3378},"ENV31-C. Do not rely on an environment pointer following an operation that may invalidate it","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fenvironment-env\u002Fenv31-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F07.environment-env\u002F3.env31-c",{"title":3380,"path":3381,"stem":3382},"ENV32-C. All exit handlers must return normally","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fenvironment-env\u002Fenv32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F07.environment-env\u002F4.env32-c",{"title":3384,"path":3385,"stem":3386},"ENV33-C. Do not call system()","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fenvironment-env\u002Fenv33-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F07.environment-env\u002F5.env33-c",{"title":3388,"path":3389,"stem":3390},"ENV34-C. Do not store pointers returned by certain functions","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fenvironment-env\u002Fenv34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F07.environment-env\u002F6.env34-c",{"title":3392,"path":3393,"stem":3394,"children":3395},"Error Handling (ERR)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ferror-handling-err","4.sei-cert-c-coding-standard\u002F03.rules\u002F08.error-handling-err\u002F1.index",[3396,3397,3401,3405,3409],{"title":3392,"path":3393,"stem":3394},{"title":3398,"path":3399,"stem":3400},"ERR30-C. Take care when reading errno","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ferror-handling-err\u002Ferr30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F08.error-handling-err\u002F2.err30-c",{"title":3402,"path":3403,"stem":3404},"ERR32-C. Do not rely on indeterminate values of errno","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ferror-handling-err\u002Ferr32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F08.error-handling-err\u002F3.err32-c",{"title":3406,"path":3407,"stem":3408},"ERR33-C. Detect and handle standard library errors","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ferror-handling-err\u002Ferr33-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F08.error-handling-err\u002F4.err33-c",{"title":3410,"path":3411,"stem":3412},"ERR34-C. Detect errors when converting a string to a number","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ferror-handling-err\u002Ferr34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F08.error-handling-err\u002F5.err34-c",{"title":3414,"path":3415,"stem":3416,"children":3417},"Expressions (EXP)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F01.index",[3418,3419,3423,3427,3431,3435,3439,3443,3447,3451,3455,3459,3463,3467,3471,3475],{"title":3414,"path":3415,"stem":3416},{"title":3420,"path":3421,"stem":3422},"EXP30-C. Do not depend on the order of evaluation for side effects","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F02.exp30-c",{"title":3424,"path":3425,"stem":3426},"EXP32-C. Do not access a volatile object through a nonvolatile reference","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F03.exp32-c",{"title":3428,"path":3429,"stem":3430},"EXP33-C. Do not read uninitialized memory","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp33-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F04.exp33-c",{"title":3432,"path":3433,"stem":3434},"EXP34-C. Do not dereference null pointers","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F05.exp34-c",{"title":3436,"path":3437,"stem":3438},"EXP35-C. Do not modify objects with temporary lifetime","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp35-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F06.exp35-c",{"title":3440,"path":3441,"stem":3442},"EXP36-C. Do not cast pointers into more strictly aligned pointer types","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp36-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F07.exp36-c",{"title":3444,"path":3445,"stem":3446},"EXP37-C. Call functions with the correct number and type of arguments","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F08.exp37-c",{"title":3448,"path":3449,"stem":3450},"EXP39-C. Do not access a variable through a pointer of an incompatible type","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp39-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F09.exp39-c",{"title":3452,"path":3453,"stem":3454},"EXP40-C. Do not modify constant objects","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp40-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F10.exp40-c",{"title":3456,"path":3457,"stem":3458},"EXP42-C. Do not compare padding data","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp42-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F11.exp42-c",{"title":3460,"path":3461,"stem":3462},"EXP43-C. Avoid undefined behavior when using restrict-qualified pointers","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp43-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F12.exp43-c",{"title":3464,"path":3465,"stem":3466},"EXP44-C. Do not rely on side effects in operands to sizeof, _Alignof, or _Generic","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp44-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F13.exp44-c",{"title":3468,"path":3469,"stem":3470},"EXP45-C. Do not perform assignments in selection statements","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp45-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F14.exp45-c",{"title":3472,"path":3473,"stem":3474},"EXP46-C. Do not use a bitwise operator with a Boolean-like operand","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp46-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F15.exp46-c",{"title":3476,"path":3477,"stem":3478},"EXP47-C. Do not call va_arg with an argument of the incorrect type","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp47-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F16.exp47-c",{"title":3480,"path":3481,"stem":3482,"children":3483},"Floating Point (FLP)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ffloating-point-flp","4.sei-cert-c-coding-standard\u002F03.rules\u002F10.floating-point-flp\u002F1.index",[3484,3485,3489,3493,3497,3501],{"title":3480,"path":3481,"stem":3482},{"title":3486,"path":3487,"stem":3488},"FLP30-C. Do not use floating-point variables as loop counters","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ffloating-point-flp\u002Fflp30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F10.floating-point-flp\u002F2.flp30-c",{"title":3490,"path":3491,"stem":3492},"FLP32-C. Prevent or detect domain and range errors in math functions","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ffloating-point-flp\u002Fflp32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F10.floating-point-flp\u002F3.flp32-c",{"title":3494,"path":3495,"stem":3496},"FLP34-C. Ensure that floating-point conversions are within range of the new type","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ffloating-point-flp\u002Fflp34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F10.floating-point-flp\u002F4.flp34-c",{"title":3498,"path":3499,"stem":3500},"FLP36-C. Preserve precision when converting integral values to floating-point type","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ffloating-point-flp\u002Fflp36-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F10.floating-point-flp\u002F5.flp36-c",{"title":3502,"path":3503,"stem":3504},"FLP37-C. Do not use object representations to compare floating-point values","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ffloating-point-flp\u002Fflp37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F10.floating-point-flp\u002F6.flp37-c",{"title":3506,"path":3507,"stem":3508,"children":3509},"Input Output (FIO)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F01.index",[3510,3511,3515,3519,3523,3527,3531,3535,3539,3543,3547,3551,3555,3559],{"title":3506,"path":3507,"stem":3508},{"title":3512,"path":3513,"stem":3514},"FIO30-C. Exclude user input from format strings","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F02.fio30-c",{"title":3516,"path":3517,"stem":3518},"FIO32-C. Do not perform operations on devices that are only appropriate for files","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F03.fio32-c",{"title":3520,"path":3521,"stem":3522},"FIO34-C. Distinguish between characters read from a file and EOF or WEOF","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F04.fio34-c",{"title":3524,"path":3525,"stem":3526},"FIO37-C. Do not assume that fgets() or fgetws() returns a nonempty string when successful","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F05.fio37-c",{"title":3528,"path":3529,"stem":3530},"FIO38-C. Do not copy a FILE object","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio38-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F06.fio38-c",{"title":3532,"path":3533,"stem":3534},"FIO39-C. Do not alternately input and output from a stream without an intervening flush or positioning call","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio39-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F07.fio39-c",{"title":3536,"path":3537,"stem":3538},"FIO40-C. Reset strings on fgets() or fgetws() failure","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio40-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F08.fio40-c",{"title":3540,"path":3541,"stem":3542},"FIO41-C. Do not call getc(), putc(), getwc(), or putwc() with a stream argument that has side effects","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio41-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F09.fio41-c",{"title":3544,"path":3545,"stem":3546},"FIO42-C. Close files when they are no longer needed","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio42-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F10.fio42-c",{"title":3548,"path":3549,"stem":3550},"FIO44-C. Only use values for fsetpos() that are returned from fgetpos()","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio44-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F11.fio44-c",{"title":3552,"path":3553,"stem":3554},"FIO45-C. Avoid TOCTOU race conditions while accessing files","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio45-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F12.fio45-c",{"title":3556,"path":3557,"stem":3558},"FIO46-C. Do not access a closed file","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio46-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F13.fio46-c",{"title":3560,"path":3561,"stem":3562},"FIO47-C. Use valid format strings","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio47-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F14.fio47-c",{"title":3564,"path":3565,"stem":3566,"children":3567},"Integers (INT)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F1.index",[3568,3569,3573,3577,3581,3585,3589,3593],{"title":3564,"path":3565,"stem":3566},{"title":3570,"path":3571,"stem":3572},"INT30-C. Ensure that unsigned integer operations do not wrap","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int\u002Fint30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F2.int30-c",{"title":3574,"path":3575,"stem":3576},"INT31-C. Ensure that integer conversions do not result in lost or misinterpreted data","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int\u002Fint31-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F3.int31-c",{"title":3578,"path":3579,"stem":3580},"INT32-C. Ensure that operations on signed integers do not result in overflow","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int\u002Fint32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F4.int32-c",{"title":3582,"path":3583,"stem":3584},"INT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int\u002Fint33-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F5.int33-c",{"title":3586,"path":3587,"stem":3588},"INT34-C. Do not shift an expression by a negative number of bits or by greater than or equal to the number of bits that exist in the operand","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int\u002Fint34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F6.int34-c",{"title":3590,"path":3591,"stem":3592},"INT35-C. Use correct integer precisions","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int\u002Fint35-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F7.int35-c",{"title":3594,"path":3595,"stem":3596},"INT36-C. Converting a pointer to integer or integer to pointer","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int\u002Fint36-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F8.int36-c",{"title":3598,"path":3599,"stem":3600,"children":3601},"Memory Management (MEM)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmemory-management-mem","4.sei-cert-c-coding-standard\u002F03.rules\u002F13.memory-management-mem\u002F1.index",[3602,3603,3607,3611,3615,3619,3623],{"title":3598,"path":3599,"stem":3600},{"title":3604,"path":3605,"stem":3606},"MEM30-C. Do not access freed memory","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F13.memory-management-mem\u002F2.mem30-c",{"title":3608,"path":3609,"stem":3610},"MEM31-C. Free dynamically allocated memory when no longer needed","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem31-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F13.memory-management-mem\u002F3.mem31-c",{"title":3612,"path":3613,"stem":3614},"MEM33-C. Allocate and copy structures containing a flexible array member dynamically","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem33-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F13.memory-management-mem\u002F4.mem33-c",{"title":3616,"path":3617,"stem":3618},"MEM34-C. Only free memory allocated dynamically","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F13.memory-management-mem\u002F5.mem34-c",{"title":3620,"path":3621,"stem":3622},"MEM35-C. Allocate sufficient memory for an object","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem35-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F13.memory-management-mem\u002F6.mem35-c",{"title":3624,"path":3625,"stem":3626},"MEM36-C. Do not modify the alignment of objects by calling realloc()","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem36-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F13.memory-management-mem\u002F7.mem36-c",{"title":3628,"path":3629,"stem":3630,"children":3631},"Microsoft Windows (WIN)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmicrosoft-windows-win","4.sei-cert-c-coding-standard\u002F03.rules\u002F14.microsoft-windows-win\u002F1.index",[3632,3633],{"title":3628,"path":3629,"stem":3630},{"title":3634,"path":3635,"stem":3636},"WIN30-C. Properly pair allocation and deallocation functions","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmicrosoft-windows-win\u002Fwin30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F14.microsoft-windows-win\u002F2.win30-c",{"title":3638,"path":3639,"stem":3640,"children":3641},"Miscellaneous (MSC)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F1.index",[3642,3643,3647,3651,3655,3659,3663,3667,3671],{"title":3638,"path":3639,"stem":3640},{"title":3644,"path":3645,"stem":3646},"MSC30-C. Do not use the rand() function for generating pseudorandom numbers","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F2.msc30-c",{"title":3648,"path":3649,"stem":3650},"MSC32-C. Properly seed pseudorandom number generators","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F3.msc32-c",{"title":3652,"path":3653,"stem":3654},"MSC33-C. Do not pass invalid data to the asctime() function","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc33-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F4.msc33-c",{"title":3656,"path":3657,"stem":3658},"MSC37-C. Ensure that control never reaches the end of a non-void function","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F5.msc37-c",{"title":3660,"path":3661,"stem":3662},"MSC38-C. Do not treat a predefined identifier as an object if it might only be implemented as a macro","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc38-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F6.msc38-c",{"title":3664,"path":3665,"stem":3666},"MSC39-C. Do not call va_arg() on a va_list that has an indeterminate value","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc39-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F7.msc39-c",{"title":3668,"path":3669,"stem":3670},"MSC40-C. Do not violate constraints","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc40-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F8.msc40-c",{"title":3672,"path":3673,"stem":3674},"MSC41-C. Never hard code sensitive information","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc41-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F9.msc41-c",{"title":3676,"path":3677,"stem":3678,"children":3679},"POSIX (POS)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F01.index",[3680,3681,3685,3689,3693,3697,3701,3705,3709,3713,3717,3721,3725,3729,3733,3737,3741],{"title":3676,"path":3677,"stem":3678},{"title":3682,"path":3683,"stem":3684},"POS30-C. Use the readlink() function properly","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F02.pos30-c",{"title":3686,"path":3687,"stem":3688},"POS34-C. Do not call putenv() with a pointer to an automatic variable as the argument","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F03.pos34-c",{"title":3690,"path":3691,"stem":3692},"POS35-C. Avoid race conditions while checking for the existence of a symbolic link","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos35-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F04.pos35-c",{"title":3694,"path":3695,"stem":3696},"POS36-C. Observe correct revocation order while relinquishing privileges","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos36-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F05.pos36-c",{"title":3698,"path":3699,"stem":3700},"POS37-C. Ensure that privilege relinquishment is successful","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F06.pos37-c",{"title":3702,"path":3703,"stem":3704},"POS38-C. Beware of race conditions when using fork and file descriptors","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos38-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F07.pos38-c",{"title":3706,"path":3707,"stem":3708},"POS39-C. Use the correct byte ordering when transferring data between systems","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos39-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F08.pos39-c",{"title":3710,"path":3711,"stem":3712},"POS44-C. Do not use signals to terminate threads","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos44-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F09.pos44-c",{"title":3714,"path":3715,"stem":3716},"POS47-C. Do not use threads that can be canceled asynchronously","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos47-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F10.pos47-c",{"title":3718,"path":3719,"stem":3720},"POS48-C. Do not unlock or destroy another POSIX thread's mutex","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos48-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F11.pos48-c",{"title":3722,"path":3723,"stem":3724},"POS49-C. When data must be accessed by multiple threads, provide a mutex and guarantee no adjacent data is also accessed","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos49-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F12.pos49-c",{"title":3726,"path":3727,"stem":3728},"POS50-C. Declare objects shared between POSIX threads with appropriate storage durations","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos50-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F13.pos50-c",{"title":3730,"path":3731,"stem":3732},"POS51-C. Avoid deadlock with POSIX threads by locking in predefined order","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos51-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F14.pos51-c",{"title":3734,"path":3735,"stem":3736},"POS52-C. Do not perform operations that can block while holding a POSIX lock","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos52-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F15.pos52-c",{"title":3738,"path":3739,"stem":3740},"POS53-C. Do not use more than one mutex for concurrent waiting operations on a condition variable","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos53-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F16.pos53-c",{"title":3742,"path":3743,"stem":3744},"POS54-C. Detect and handle POSIX library errors","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos54-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F17.pos54-c",{"title":3746,"path":3747,"stem":3748,"children":3749},"Preprocessor (PRE)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fpreprocessor-pre","4.sei-cert-c-coding-standard\u002F03.rules\u002F17.preprocessor-pre\u002F1.index",[3750,3751,3755,3759],{"title":3746,"path":3747,"stem":3748},{"title":3752,"path":3753,"stem":3754},"PRE30-C. Do not create a universal character name through concatenation","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fpreprocessor-pre\u002Fpre30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F17.preprocessor-pre\u002F2.pre30-c",{"title":3756,"path":3757,"stem":3758},"PRE31-C. Avoid side effects in arguments to unsafe macros","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fpreprocessor-pre\u002Fpre31-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F17.preprocessor-pre\u002F3.pre31-c",{"title":3760,"path":3761,"stem":3762},"PRE32-C. Do not use preprocessor directives in invocations of function-like macros","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fpreprocessor-pre\u002Fpre32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F17.preprocessor-pre\u002F4.pre32-c",{"title":3764,"path":3765,"stem":3766,"children":3767},"Signals (SIG)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fsignals-sig","4.sei-cert-c-coding-standard\u002F03.rules\u002F18.signals-sig\u002F1.index",[3768,3769,3773,3777,3781],{"title":3764,"path":3765,"stem":3766},{"title":3770,"path":3771,"stem":3772},"SIG30-C. Call only asynchronous-safe functions within signal handlers","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fsignals-sig\u002Fsig30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F18.signals-sig\u002F2.sig30-c",{"title":3774,"path":3775,"stem":3776},"SIG31-C. Do not access shared objects in signal handlers","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fsignals-sig\u002Fsig31-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F18.signals-sig\u002F3.sig31-c",{"title":3778,"path":3779,"stem":3780},"SIG34-C. Do not call signal() from within interruptible signal handlers","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fsignals-sig\u002Fsig34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F18.signals-sig\u002F4.sig34-c",{"title":3782,"path":3783,"stem":3784},"SIG35-C. Do not return from a computational exception signal handler","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fsignals-sig\u002Fsig35-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F18.signals-sig\u002F5.sig35-c",{"title":3786,"path":3787,"stem":3788,"children":3789},"Back Matter","\u002Fsei-cert-c-coding-standard\u002Fback-matter","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F1.index",[3790,3791,3795,3799,3803,3807,4011,4067],{"title":3786,"path":3787,"stem":3788},{"title":3792,"path":3793,"stem":3794},"AA. Bibliography","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F2.aa-bibliography",{"title":3796,"path":3797,"stem":3798},"BB. Definitions","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fbb-definitions","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F3.bb-definitions",{"title":3800,"path":3801,"stem":3802},"CC. Undefined Behavior","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fcc-undefined-behavior","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F4.cc-undefined-behavior",{"title":3804,"path":3805,"stem":3806},"DD. Unspecified Behavior","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fdd-unspecified-behavior","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F5.dd-unspecified-behavior",{"title":3808,"path":3809,"stem":3810,"children":3811},"EE. Analyzers","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F01.index",[3812,3813,3817,3821,3825,3829,3833,3837,3841,3845,3849,3853,3857,3859,3863,3867,3871,3875,3879,3883,3887,3891,3895,3899,3903,3907,3911,3913,3917,3919,3923,3926,3930,3934,3938,3942,3946,3948,3952,3956,3960,3963,3967,3971,3975,3979,3983,3987,3991,3995,3999,4003,4007],{"title":3808,"path":3809,"stem":3810},{"title":3814,"path":3815,"stem":3816},"Astrée","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fastree","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F02.astree",{"title":3818,"path":3819,"stem":3820},"Astrée_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fastree_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F03.astree_v",{"title":3822,"path":3823,"stem":3824},"Axivion Bauhaus Suite","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Faxivion-bauhaus-suite","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F04.axivion-bauhaus-suite",{"title":3826,"path":3827,"stem":3828},"Axivion Bauhaus Suite_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Faxivion-bauhaus-suite_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F05.axivion-bauhaus-suite_v",{"title":3830,"path":3831,"stem":3832},"Clang","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fclang","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F06.clang",{"title":3834,"path":3835,"stem":3836},"Clang_38_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fclang_38_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F07.clang_38_v",{"title":3838,"path":3839,"stem":3840},"Clang_39_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fclang_39_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F08.clang_39_v",{"title":3842,"path":3843,"stem":3844},"Clang_40_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fclang_40_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F09.clang_40_v",{"title":3846,"path":3847,"stem":3848},"Clang_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fclang_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F10.clang_v",{"title":3850,"path":3851,"stem":3852},"Codee","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcodee","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F11.codee",{"title":3854,"path":3855,"stem":3856},"Codee_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcodee_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F12.codee_v",{"title":2516,"path":2515,"stem":3858},"4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F13.codesonar",{"title":3860,"path":3861,"stem":3862},"CodeSonar_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcodesonar_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F14.codesonar_v",{"title":3864,"path":3865,"stem":3866},"Coverity","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcoverity","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F15.coverity",{"title":3868,"path":3869,"stem":3870},"Coverity_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcoverity_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F16.coverity_v",{"title":3872,"path":3873,"stem":3874},"Cppcheck","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcppcheck","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F17.cppcheck",{"title":3876,"path":3877,"stem":3878},"Cppcheck Premium","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcppcheck-premium","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F18.cppcheck-premium",{"title":3880,"path":3881,"stem":3882},"Cppcheck Premium_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcppcheck-premium_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F19.cppcheck-premium_v",{"title":3884,"path":3885,"stem":3886},"Cppcheck_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcppcheck_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F20.cppcheck_v",{"title":3888,"path":3889,"stem":3890},"ECLAIR","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Feclair","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F21.eclair",{"title":3892,"path":3893,"stem":3894},"ECLAIR_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Feclair_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F22.eclair_v",{"title":3896,"path":3897,"stem":3898},"EDG","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fedg","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F23.edg",{"title":3900,"path":3901,"stem":3902},"EDG_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fedg_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F24.edg_v",{"title":3904,"path":3905,"stem":3906},"GCC","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fgcc","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F25.gcc",{"title":3908,"path":3909,"stem":3910},"GCC_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fgcc_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F26.gcc_v",{"title":2591,"path":2590,"stem":3912},"4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F27.helix-qac",{"title":3914,"path":3915,"stem":3916},"Helix QAC_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fhelix-qac_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F28.helix-qac_v",{"title":2639,"path":2638,"stem":3918},"4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F29.klocwork",{"title":3920,"path":3921,"stem":3922},"Klocwork_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fklocwork_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F30.klocwork_v",{"title":3924,"path":2668,"stem":3925},"LDRA","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F31.ldra",{"title":3927,"path":3928,"stem":3929},"LDRA_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fldra_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F32.ldra_v",{"title":3931,"path":3932,"stem":3933},"Parasoft","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fparasoft","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F33.parasoft",{"title":3935,"path":3936,"stem":3937},"Parasoft_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fparasoft_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F34.parasoft_v",{"title":3939,"path":3940,"stem":3941},"PC-lint Plus","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fpc-lint-plus","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F35.pc-lint-plus",{"title":3943,"path":3944,"stem":3945},"PC-lint Plus_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fpc-lint-plus_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F36.pc-lint-plus_v",{"title":2696,"path":2695,"stem":3947},"4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F37.polyspace-bug-finder",{"title":3949,"path":3950,"stem":3951},"Polyspace Bug Finder_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fpolyspace-bug-finder_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F38.polyspace-bug-finder_v",{"title":3953,"path":3954,"stem":3955},"PVS-Studio","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fpvs-studio","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F39.pvs-studio",{"title":3957,"path":3958,"stem":3959},"PVS-Studio_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fpvs-studio_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F40.pvs-studio_v",{"title":3961,"path":2543,"stem":3962},"Rose","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F41.rose",{"title":3964,"path":3965,"stem":3966},"Rose_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Frose_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F42.rose_v",{"title":3968,"path":3969,"stem":3970},"Rosecheckers Code","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Frosecheckers-code","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F43.rosecheckers-code",{"title":3972,"path":3973,"stem":3974},"RuleChecker","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Frulechecker","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F44.rulechecker",{"title":3976,"path":3977,"stem":3978},"RuleChecker_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Frulechecker_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F45.rulechecker_v",{"title":3980,"path":3981,"stem":3982},"Security Reviewer - Static Reviewer","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fsecurity-reviewer-static-reviewer","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F46.security-reviewer-static-reviewer",{"title":3984,"path":3985,"stem":3986},"Security Reviewer - Static Reviewer_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fsecurity-reviewer-static-reviewer_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F47.security-reviewer-static-reviewer_v",{"title":3988,"path":3989,"stem":3990},"SonarQube C\u002FC++ Plugin","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fsonarqube-ccpp-plugin","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F48.sonarqube-ccpp-plugin",{"title":3992,"path":3993,"stem":3994},"SonarQube C\u002FC++ Plugin_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fsonarqube-ccpp-plugin_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F49.sonarqube-ccpp-plugin_v",{"title":3996,"path":3997,"stem":3998},"Splint","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fsplint","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F50.splint",{"title":4000,"path":4001,"stem":4002},"Splint_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fsplint_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F51.splint_v",{"title":4004,"path":4005,"stem":4006},"TrustInSoft Analyzer","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Ftrustinsoft-analyzer","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F52.trustinsoft-analyzer",{"title":4008,"path":4009,"stem":4010},"TrustInSoft Analyzer_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Ftrustinsoft-analyzer_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F53.trustinsoft-analyzer_v",{"title":4012,"path":4013,"stem":4014,"children":4015},"FF. Related Guidelines","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F01.index",[4016,4017,4021,4025,4029,4033,4037,4041,4045,4049,4052,4055,4059,4063],{"title":4012,"path":4013,"stem":4014},{"title":4018,"path":4019,"stem":4020},"2003","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F02.2003","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F02.2003",{"title":4022,"path":4023,"stem":4024},"2006","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F03.2006","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F03.2006",{"title":4026,"path":4027,"stem":4028},"2007","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F04.2007","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F04.2007",{"title":4030,"path":4031,"stem":4032},"2008","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F05.2008","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F05.2008",{"title":4034,"path":4035,"stem":4036},"2010","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F06.2010","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F06.2010",{"title":4038,"path":4039,"stem":4040},"2011","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F07.2011","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F07.2011",{"title":4042,"path":4043,"stem":4044},"2012","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F08.2012","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F08.2012",{"title":4046,"path":4047,"stem":4048},"2013","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F09.2013","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F09.2013",{"title":4046,"path":4050,"stem":4051},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F10.2013","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F10.2013",{"title":2838,"path":4053,"stem":4054},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002Fmitre-cwe","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F11.mitre-cwe",{"title":4056,"path":4057,"stem":4058},"MITRE CWE 2.11","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002Fmitre-cwe-211","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F12.mitre-cwe-211",{"title":4060,"path":4061,"stem":4062},"MITRE CWE 3.1","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002Fmitre-cwe-31","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F13.mitre-cwe-31",{"title":4064,"path":4065,"stem":4066},"MITRE CWE 3.11","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002Fmitre-cwe-311","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F14.mitre-cwe-311",{"title":4068,"path":4069,"stem":4070},"GG. Risk Assessments","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fgg-risk-assessments","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F8.gg-risk-assessments",{"title":4072,"path":4073,"stem":4074,"children":4075},"Admin","\u002Fsei-cert-c-coding-standard\u002Fadmin","4.sei-cert-c-coding-standard\u002F05.admin\u002F1.index",[4076,4077,4081],{"title":4072,"path":4073,"stem":4074},{"title":4078,"path":4079,"stem":4080},"TODO List","\u002Fsei-cert-c-coding-standard\u002Fadmin\u002Ftodo-list","4.sei-cert-c-coding-standard\u002F05.admin\u002F2.todo-list",{"title":4082,"path":4083,"stem":4084},"Undefined and implementation-defined behaviors not deemed ruleworthy","\u002Fsei-cert-c-coding-standard\u002Fadmin\u002Fundefined-and-implementation-defined-behaviors-not-deemed-ruleworthy","4.sei-cert-c-coding-standard\u002F05.admin\u002F3.undefined-and-implementation-defined-behaviors-not-deemed-ruleworthy",{"title":4086,"path":4087,"stem":4088},"Coding Style Guidelines","\u002Fsei-cert-c-coding-standard\u002Fcoding-style-guidelines","4.sei-cert-c-coding-standard\u002F05.coding-style-guidelines",{"title":4090,"path":4091,"stem":4092},"Errata for SEI CERT C Coding Standard (2016 Edition)","\u002Fsei-cert-c-coding-standard\u002Ferrata-for-sei-cert-c-coding-standard-2016-edition","4.sei-cert-c-coding-standard\u002F06.errata-for-sei-cert-c-coding-standard-2016-edition",{"title":4094,"path":4095,"stem":4096},"Wiki Contents","\u002Fsei-cert-c-coding-standard\u002Fwiki-contents","4.sei-cert-c-coding-standard\u002F06.wiki-contents",{"title":4098,"path":4099,"stem":4100,"children":4101},"Recommendations","\u002Fsei-cert-c-coding-standard\u002Frecommendations","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F01.index",[4102,4103,4144,4161,4206,4247,4344,4361,4394,4463,4500,4576,4641,4690,4715,4808,4829,4886],{"title":4098,"path":4099,"stem":4100},{"title":3202,"path":4104,"stem":4105,"children":4106},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F01.index",[4107,4108,4112,4116,4120,4124,4128,4132,4136,4140],{"title":3202,"path":4104,"stem":4105},{"title":4109,"path":4110,"stem":4111},"API00-C. Functions should validate their parameters","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F02.api00-c",{"title":4113,"path":4114,"stem":4115},"API01-C. Avoid laying out strings in memory directly before sensitive data","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F03.api01-c",{"title":4117,"path":4118,"stem":4119},"API02-C. Functions that read or write to or from an array should take an argument to specify the source or target size","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F04.api02-c",{"title":4121,"path":4122,"stem":4123},"API03-C. Create consistent interfaces and capabilities across related functions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F05.api03-c",{"title":4125,"path":4126,"stem":4127},"API04-C. Provide a consistent and usable error-checking mechanism","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F06.api04-c",{"title":4129,"path":4130,"stem":4131},"API05-C. Use conformant array parameters","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F07.api05-c",{"title":4133,"path":4134,"stem":4135},"API07-C. Enforce type safety","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F08.api07-c",{"title":4137,"path":4138,"stem":4139},"API09-C. Compatible values should have the same type","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi09-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F09.api09-c",{"title":4141,"path":4142,"stem":4143},"API10-C. APIs should have security options enabled by default","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi10-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F10.api10-c",{"title":3206,"path":4145,"stem":4146,"children":4147},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Farrays-arr","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F03.arrays-arr\u002F1.index",[4148,4149,4153,4157],{"title":3206,"path":4145,"stem":4146},{"title":4150,"path":4151,"stem":4152},"ARR00-C. Understand how arrays work","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Farrays-arr\u002Farr00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F03.arrays-arr\u002F2.arr00-c",{"title":4154,"path":4155,"stem":4156},"ARR01-C. Do not apply the sizeof operator to a pointer when taking the size of an array","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Farrays-arr\u002Farr01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F03.arrays-arr\u002F3.arr01-c",{"title":4158,"path":4159,"stem":4160},"ARR02-C. Explicitly specify array bounds, even if implicitly defined by an initializer","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Farrays-arr\u002Farr02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F03.arrays-arr\u002F4.arr02-c",{"title":3236,"path":4162,"stem":4163,"children":4164},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F01.index",[4165,4166,4170,4174,4178,4182,4186,4190,4194,4198,4202],{"title":3236,"path":4162,"stem":4163},{"title":4167,"path":4168,"stem":4169},"STR00-C. Represent characters using an appropriate type","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F02.str00-c",{"title":4171,"path":4172,"stem":4173},"STR01-C. Adopt and implement a consistent plan for managing strings","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F03.str01-c",{"title":4175,"path":4176,"stem":4177},"STR02-C. Sanitize data passed to complex subsystems","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F04.str02-c",{"title":4179,"path":4180,"stem":4181},"STR03-C. Do not inadvertently truncate a string","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F05.str03-c",{"title":4183,"path":4184,"stem":4185},"STR04-C. Use plain char for characters in the basic character set","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F06.str04-c",{"title":4187,"path":4188,"stem":4189},"STR05-C. Use pointers to const when referring to string literals","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F07.str05-c",{"title":4191,"path":4192,"stem":4193},"STR06-C. Do not assume that strtok() leaves the parse string unchanged","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F08.str06-c",{"title":4195,"path":4196,"stem":4197},"STR09-C. Don't assume numeric values for expressions with type plain character","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr09-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F09.str09-c",{"title":4199,"path":4200,"stem":4201},"STR10-C. Do not concatenate different type of string literals","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr10-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F10.str10-c",{"title":4203,"path":4204,"stem":4205},"STR11-C. Do not specify the bound of a character array initialized with a string literal","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr11-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F11.str11-c",{"title":3266,"path":4207,"stem":4208,"children":4209},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F01.index",[4210,4211,4215,4219,4223,4227,4231,4235,4239,4243],{"title":3266,"path":4207,"stem":4208},{"title":4212,"path":4213,"stem":4214},"CON01-C. Acquire and release synchronization primitives in the same module, at the same level of abstraction","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F02.con01-c",{"title":4216,"path":4217,"stem":4218},"CON02-C. Do not use volatile as a synchronization primitive","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F03.con02-c",{"title":4220,"path":4221,"stem":4222},"CON03-C. Ensure visibility when accessing shared variables","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F04.con03-c",{"title":4224,"path":4225,"stem":4226},"CON04-C. Join or detach threads even if their exit status is unimportant","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F05.con04-c",{"title":4228,"path":4229,"stem":4230},"CON05-C. Do not perform operations that can block while holding a lock","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F06.con05-c",{"title":4232,"path":4233,"stem":4234},"CON06-C. Ensure that every mutex outlives the data it protects","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F07.con06-c",{"title":4236,"path":4237,"stem":4238},"CON07-C. Ensure that compound operations on shared variables are atomic","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F08.con07-c",{"title":4240,"path":4241,"stem":4242},"CON08-C. Do not assume that a group of calls to independently atomic methods is atomic","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon08-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F09.con08-c",{"title":4244,"path":4245,"stem":4246},"CON09-C. Avoid the ABA problem when using lock-free algorithms","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon09-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F10.con09-c",{"title":3328,"path":4248,"stem":4249,"children":4250},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F01.index",[4251,4252,4256,4260,4264,4268,4272,4276,4280,4284,4288,4292,4296,4300,4304,4308,4312,4316,4320,4324,4328,4332,4336,4340],{"title":3328,"path":4248,"stem":4249},{"title":4253,"path":4254,"stem":4255},"DCL00-C. Const-qualify immutable objects","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F02.dcl00-c",{"title":4257,"path":4258,"stem":4259},"DCL01-C. Do not reuse variable names in subscopes","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F03.dcl01-c",{"title":4261,"path":4262,"stem":4263},"DCL02-C. Use visually distinct identifiers","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F04.dcl02-c",{"title":4265,"path":4266,"stem":4267},"DCL03-C. Use a static assertion to test the value of a constant expression","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F05.dcl03-c",{"title":4269,"path":4270,"stem":4271},"DCL04-C. Do not declare more than one variable per declaration","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F06.dcl04-c",{"title":4273,"path":4274,"stem":4275},"DCL05-C. Use typedefs of non-pointer types only","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F07.dcl05-c",{"title":4277,"path":4278,"stem":4279},"DCL06-C. Use meaningful symbolic constants to represent literal values","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F08.dcl06-c",{"title":4281,"path":4282,"stem":4283},"DCL07-C. Include the appropriate type information in function declarators","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F09.dcl07-c",{"title":4285,"path":4286,"stem":4287},"DCL08-C. Properly encode relationships in constant definitions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl08-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F10.dcl08-c",{"title":4289,"path":4290,"stem":4291},"DCL09-C. Declare functions that return errno with a return type of errno_t","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl09-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F11.dcl09-c",{"title":4293,"path":4294,"stem":4295},"DCL10-C. Maintain the contract between the writer and caller of variadic functions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl10-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F12.dcl10-c",{"title":4297,"path":4298,"stem":4299},"DCL11-C. Understand the type issues associated with variadic functions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl11-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F13.dcl11-c",{"title":4301,"path":4302,"stem":4303},"DCL12-C. Implement abstract data types using opaque types","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl12-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F14.dcl12-c",{"title":4305,"path":4306,"stem":4307},"DCL13-C. Declare function parameters that are pointers to values not changed by the function as const","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl13-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F15.dcl13-c",{"title":4309,"path":4310,"stem":4311},"DCL15-C. Declare file-scope objects or functions that do not need external linkage as static","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl15-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F16.dcl15-c",{"title":4313,"path":4314,"stem":4315},"DCL16-C. Use \"L,\" not \"l,\" to indicate a long value","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl16-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F17.dcl16-c",{"title":4317,"path":4318,"stem":4319},"DCL17-C. Beware of miscompiled volatile-qualified variables","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl17-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F18.dcl17-c",{"title":4321,"path":4322,"stem":4323},"DCL18-C. Do not begin integer constants with 0 when specifying a decimal value","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl18-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F19.dcl18-c",{"title":4325,"path":4326,"stem":4327},"DCL19-C. Minimize the scope of variables and functions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl19-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F20.dcl19-c",{"title":4329,"path":4330,"stem":4331},"DCL20-C. Explicitly specify void when a function accepts no arguments","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl20-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F21.dcl20-c",{"title":4333,"path":4334,"stem":4335},"DCL21-C. Understand the storage of compound literals","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl21-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F22.dcl21-c",{"title":4337,"path":4338,"stem":4339},"DCL22-C. Use volatile for data that cannot be cached","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl22-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F23.dcl22-c",{"title":4341,"path":4342,"stem":4343},"DCL23-C. Guarantee that mutually visible identifiers are unique","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl23-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F24.dcl23-c",{"title":3366,"path":4345,"stem":4346,"children":4347},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fenvironment-env","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F07.environment-env\u002F1.index",[4348,4349,4353,4357],{"title":3366,"path":4345,"stem":4346},{"title":4350,"path":4351,"stem":4352},"ENV01-C. Do not make assumptions about the size of an environment variable","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fenvironment-env\u002Fenv01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F07.environment-env\u002F2.env01-c",{"title":4354,"path":4355,"stem":4356},"ENV02-C. Beware of multiple environment variables with the same effective name","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fenvironment-env\u002Fenv02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F07.environment-env\u002F3.env02-c",{"title":4358,"path":4359,"stem":4360},"ENV03-C. Sanitize the environment when invoking external programs","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fenvironment-env\u002Fenv03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F07.environment-env\u002F4.env03-c",{"title":3392,"path":4362,"stem":4363,"children":4364},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F1.index",[4365,4366,4370,4374,4378,4382,4386,4390],{"title":3392,"path":4362,"stem":4363},{"title":4367,"path":4368,"stem":4369},"ERR00-C. Adopt and implement a consistent and comprehensive error-handling policy","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err\u002Ferr00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F2.err00-c",{"title":4371,"path":4372,"stem":4373},"ERR01-C. Use ferror() rather than errno to check for FILE stream errors","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err\u002Ferr01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F3.err01-c",{"title":4375,"path":4376,"stem":4377},"ERR02-C. Avoid in-band error indicators","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err\u002Ferr02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F4.err02-c",{"title":4379,"path":4380,"stem":4381},"ERR04-C. Choose an appropriate termination strategy","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err\u002Ferr04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F5.err04-c",{"title":4383,"path":4384,"stem":4385},"ERR05-C. Application-independent code should provide error detection without dictating error handling","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err\u002Ferr05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F6.err05-c",{"title":4387,"path":4388,"stem":4389},"ERR06-C. Understand the termination behavior of assert() and abort()","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err\u002Ferr06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F7.err06-c",{"title":4391,"path":4392,"stem":4393},"ERR07-C. Prefer functions that support error checking over equivalent functions that don't","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err\u002Ferr07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F8.err07-c",{"title":3414,"path":4395,"stem":4396,"children":4397},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F01.index",[4398,4399,4403,4407,4411,4415,4419,4423,4427,4431,4435,4439,4443,4447,4451,4455,4459],{"title":3414,"path":4395,"stem":4396},{"title":4400,"path":4401,"stem":4402},"EXP00-C. Use parentheses for precedence of operation","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F02.exp00-c",{"title":4404,"path":4405,"stem":4406},"EXP02-C. Be aware of the short-circuit behavior of the logical AND and OR operators","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F03.exp02-c",{"title":4408,"path":4409,"stem":4410},"EXP03-C. Do not assume the size of a structure is the sum of the sizes of its members","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F04.exp03-c",{"title":4412,"path":4413,"stem":4414},"EXP05-C. Do not cast away a const qualification","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F05.exp05-c",{"title":4416,"path":4417,"stem":4418},"EXP07-C. Do not diminish the benefits of constants by assuming their values in expressions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F06.exp07-c",{"title":4420,"path":4421,"stem":4422},"EXP08-C. Ensure pointer arithmetic is used correctly","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp08-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F07.exp08-c",{"title":4424,"path":4425,"stem":4426},"EXP09-C. Use sizeof to determine the size of a type or variable","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp09-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F08.exp09-c",{"title":4428,"path":4429,"stem":4430},"EXP10-C. Do not depend on the order of evaluation of subexpressions or the order in which side effects take place","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp10-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F09.exp10-c",{"title":4432,"path":4433,"stem":4434},"EXP11-C. Do not make assumptions regarding the layout of structures with bit-fields","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp11-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F10.exp11-c",{"title":4436,"path":4437,"stem":4438},"EXP12-C. Do not ignore values returned by functions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp12-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F11.exp12-c",{"title":4440,"path":4441,"stem":4442},"EXP13-C. Treat relational and equality operators as if they were nonassociative","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp13-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F12.exp13-c",{"title":4444,"path":4445,"stem":4446},"EXP14-C. Beware of integer promotion when performing bitwise operations on integer types smaller than int","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp14-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F13.exp14-c",{"title":4448,"path":4449,"stem":4450},"EXP15-C. Do not place a semicolon on the same line as an if, for, or while statement","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp15-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F14.exp15-c",{"title":4452,"path":4453,"stem":4454},"EXP16-C. Do not compare function pointers to constant values","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp16-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F15.exp16-c",{"title":4456,"path":4457,"stem":4458},"EXP19-C. Use braces for the body of an if, for, or while statement","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp19-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F16.exp19-c",{"title":4460,"path":4461,"stem":4462},"EXP20-C. Perform explicit tests to determine success, true and false, and equality","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp20-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F17.exp20-c",{"title":3480,"path":4464,"stem":4465,"children":4466},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F1.index",[4467,4468,4472,4476,4480,4484,4488,4492,4496],{"title":3480,"path":4464,"stem":4465},{"title":4469,"path":4470,"stem":4471},"FLP00-C. Understand the limitations of floating-point numbers","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp\u002Fflp00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F2.flp00-c",{"title":4473,"path":4474,"stem":4475},"FLP01-C. Take care in rearranging floating-point expressions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp\u002Fflp01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F3.flp01-c",{"title":4477,"path":4478,"stem":4479},"FLP02-C. Avoid using floating-point numbers when precise computation is needed","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp\u002Fflp02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F4.flp02-c",{"title":4481,"path":4482,"stem":4483},"FLP03-C. Detect and handle floating-point errors","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp\u002Fflp03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F5.flp03-c",{"title":4485,"path":4486,"stem":4487},"FLP04-C. Check floating-point inputs for exceptional values","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp\u002Fflp04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F6.flp04-c",{"title":4489,"path":4490,"stem":4491},"FLP05-C. Do not use denormalized numbers","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp\u002Fflp05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F7.flp05-c",{"title":4493,"path":4494,"stem":4495},"FLP06-C. Convert integers to floating point for floating-point operations","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp\u002Fflp06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F8.flp06-c",{"title":4497,"path":4498,"stem":4499},"FLP07-C. Cast the return value of a function that returns a floating-point type","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp\u002Fflp07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F9.flp07-c",{"title":3506,"path":4501,"stem":4502,"children":4503},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F01.index",[4504,4505,4506,4507,4508,4512,4516,4520,4524,4528,4532,4536,4540,4544,4548,4552,4556,4560,4564,4568,4572],{"title":3506,"path":4501,"stem":4502},{"title":3111,"path":3030,"stem":3112},{"title":30,"path":3105,"stem":3107},{"title":3114,"path":3044,"stem":3115},{"title":4509,"path":4510,"stem":4511},"FIO05-C. Identify files using multiple file attributes","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F05.fio05-c",{"title":4513,"path":4514,"stem":4515},"FIO06-C. Create files with appropriate access permissions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F06.fio06-c",{"title":4517,"path":4518,"stem":4519},"FIO08-C. Take care when calling remove() on an open file","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio08-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F07.fio08-c",{"title":4521,"path":4522,"stem":4523},"FIO09-C. Be careful with binary data when transferring data across systems","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio09-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F08.fio09-c",{"title":4525,"path":4526,"stem":4527},"FIO10-C. Take care when using the rename() function","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio10-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F09.fio10-c",{"title":4529,"path":4530,"stem":4531},"FIO11-C. Take care when specifying the mode parameter of fopen()","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio11-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F10.fio11-c",{"title":4533,"path":4534,"stem":4535},"FIO13-C. Never push back anything other than one read character","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio13-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F11.fio13-c",{"title":4537,"path":4538,"stem":4539},"FIO14-C. Understand the difference between text mode and binary mode with file streams","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio14-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F12.fio14-c",{"title":4541,"path":4542,"stem":4543},"FIO15-C. Ensure that file operations are performed in a secure directory","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio15-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F13.fio15-c",{"title":4545,"path":4546,"stem":4547},"FIO17-C. Do not rely on an ending null character when using fread()","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio17-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F14.fio17-c",{"title":4549,"path":4550,"stem":4551},"FIO18-C. Never expect fwrite() to terminate the writing process at a null character","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio18-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F15.fio18-c",{"title":4553,"path":4554,"stem":4555},"FIO19-C. Do not use fseek() and ftell() to compute the size of a regular file","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio19-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F16.fio19-c",{"title":4557,"path":4558,"stem":4559},"FIO20-C. Avoid unintentional truncation when using fgets() or fgetws()","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio20-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F17.fio20-c",{"title":4561,"path":4562,"stem":4563},"FIO21-C. Do not create temporary files in shared directories","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio21-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F18.fio21-c",{"title":4565,"path":4566,"stem":4567},"FIO22-C. Close files before spawning processes","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio22-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F19.fio22-c",{"title":4569,"path":4570,"stem":4571},"FIO23-C. Do not exit with unflushed data in stdout or stderr","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio23-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F20.fio23-c",{"title":4573,"path":4574,"stem":4575},"FIO24-C. Do not open a file that is already open","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio24-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F21.fio24-c",{"title":3564,"path":4577,"stem":4578,"children":4579},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F01.index",[4580,4581,4585,4589,4593,4597,4601,4605,4609,4613,4617,4621,4625,4629,4633,4637],{"title":3564,"path":4577,"stem":4578},{"title":4582,"path":4583,"stem":4584},"INT00-C. Understand the data model used by your implementation(s)","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F02.int00-c",{"title":4586,"path":4587,"stem":4588},"INT01-C. Use size_t or rsize_t for all integer values representing the size of an object","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F03.int01-c",{"title":4590,"path":4591,"stem":4592},"INT04-C. Enforce limits on integer values originating from tainted sources","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F05.int04-c",{"title":4594,"path":4595,"stem":4596},"INT05-C. Do not use input functions to convert character data if they cannot handle all possible inputs","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F06.int05-c",{"title":4598,"path":4599,"stem":4600},"INT07-C. Use only explicitly signed or unsigned char type for numeric values","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F07.int07-c",{"title":4602,"path":4603,"stem":4604},"INT08-C. Verify that all integer values are in range","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint08-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F08.int08-c",{"title":4606,"path":4607,"stem":4608},"INT09-C. Ensure enumeration constants map to unique values","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint09-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F09.int09-c",{"title":4610,"path":4611,"stem":4612},"INT10-C. Do not assume a positive remainder when using the % operator","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint10-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F10.int10-c",{"title":4614,"path":4615,"stem":4616},"INT12-C. Do not make assumptions about the type of a plain int bit-field when used in an expression","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint12-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F11.int12-c",{"title":4618,"path":4619,"stem":4620},"INT13-C. Use bitwise operators only on unsigned operands","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint13-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F12.int13-c",{"title":4622,"path":4623,"stem":4624},"INT14-C. Avoid performing bitwise and arithmetic operations on the same data","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint14-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F13.int14-c",{"title":4626,"path":4627,"stem":4628},"INT15-C. Use intmax_t or uintmax_t for formatted IO on programmer-defined integer types","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint15-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F14.int15-c",{"title":4630,"path":4631,"stem":4632},"INT16-C. Do not make assumptions about representation of signed integers","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint16-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F15.int16-c",{"title":4634,"path":4635,"stem":4636},"INT17-C. Define integer constants in an implementation-independent manner","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint17-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F16.int17-c",{"title":4638,"path":4639,"stem":4640},"INT18-C. Evaluate integer expressions in a larger size before comparing or assigning to that size","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint18-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F17.int18-c",{"title":3598,"path":4642,"stem":4643,"children":4644},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F01.index",[4645,4646,4650,4654,4658,4662,4666,4670,4674,4678,4682,4686],{"title":3598,"path":4642,"stem":4643},{"title":4647,"path":4648,"stem":4649},"MEM00-C. Allocate and free memory in the same module, at the same level of abstraction","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F02.mem00-c",{"title":4651,"path":4652,"stem":4653},"MEM01-C. Store a new value in pointers immediately after free()","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F03.mem01-c",{"title":4655,"path":4656,"stem":4657},"MEM02-C. Immediately cast the result of a memory allocation function call into a pointer to the allocated type","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F04.mem02-c",{"title":4659,"path":4660,"stem":4661},"MEM03-C. Clear sensitive information stored in reusable resources","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F05.mem03-c",{"title":4663,"path":4664,"stem":4665},"MEM04-C. Beware of zero-length allocations","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F06.mem04-c",{"title":4667,"path":4668,"stem":4669},"MEM05-C. Avoid large stack allocations","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F07.mem05-c",{"title":4671,"path":4672,"stem":4673},"MEM06-C. Ensure that sensitive data is not written out to disk","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F08.mem06-c",{"title":4675,"path":4676,"stem":4677},"MEM07-C. Ensure that the arguments to calloc(), when multiplied, do not wrap","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F09.mem07-c",{"title":4679,"path":4680,"stem":4681},"MEM10-C. Define and use a pointer validation function","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem10-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F10.mem10-c",{"title":4683,"path":4684,"stem":4685},"MEM11-C. Do not assume infinite heap space","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem11-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F11.mem11-c",{"title":4687,"path":4688,"stem":4689},"MEM12-C. Consider using a goto chain when leaving a function on error when using and releasing resources","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem12-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F12.mem12-c",{"title":3628,"path":4691,"stem":4692,"children":4693},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmicrosoft-windows-win","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F14.microsoft-windows-win\u002F1.index",[4694,4695,4699,4703,4707,4711],{"title":3628,"path":4691,"stem":4692},{"title":4696,"path":4697,"stem":4698},"WIN00-C. Be specific when dynamically loading libraries","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmicrosoft-windows-win\u002Fwin00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F14.microsoft-windows-win\u002F2.win00-c",{"title":4700,"path":4701,"stem":4702},"WIN01-C. Do not forcibly terminate execution","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmicrosoft-windows-win\u002Fwin01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F14.microsoft-windows-win\u002F3.win01-c",{"title":4704,"path":4705,"stem":4706},"WIN02-C. Restrict privileges when spawning child processes","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmicrosoft-windows-win\u002Fwin02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F14.microsoft-windows-win\u002F4.win02-c",{"title":4708,"path":4709,"stem":4710},"WIN03-C. Understand HANDLE inheritance","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmicrosoft-windows-win\u002Fwin03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F14.microsoft-windows-win\u002F5.win03-c",{"title":4712,"path":4713,"stem":4714},"WIN04-C. Consider encrypting function pointers","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmicrosoft-windows-win\u002Fwin04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F14.microsoft-windows-win\u002F6.win04-c",{"title":3638,"path":4716,"stem":4717,"children":4718},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F01.index",[4719,4720,4724,4728,4732,4736,4740,4744,4748,4752,4756,4760,4764,4768,4772,4776,4780,4784,4788,4792,4796,4800,4804],{"title":3638,"path":4716,"stem":4717},{"title":4721,"path":4722,"stem":4723},"MSC00-C. Compile cleanly at high warning levels","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F02.msc00-c",{"title":4725,"path":4726,"stem":4727},"MSC01-C. Strive for logical completeness","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F03.msc01-c",{"title":4729,"path":4730,"stem":4731},"MSC04-C. Use comments consistently and in a readable fashion","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F04.msc04-c",{"title":4733,"path":4734,"stem":4735},"MSC05-C. Do not manipulate time_t typed values directly","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F05.msc05-c",{"title":4737,"path":4738,"stem":4739},"MSC06-C. Beware of compiler optimizations","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F06.msc06-c",{"title":4741,"path":4742,"stem":4743},"MSC07-C. Detect and remove dead code","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F07.msc07-c",{"title":4745,"path":4746,"stem":4747},"UTF8-related issues","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Futf8-related-issues","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F08.utf8-related-issues",{"title":4749,"path":4750,"stem":4751},"MSC11-C. Incorporate diagnostic tests using assertions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc11-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F09.msc11-c",{"title":4753,"path":4754,"stem":4755},"MSC12-C. Detect and remove code that has no effect or is never executed","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc12-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F10.msc12-c",{"title":4757,"path":4758,"stem":4759},"MSC13-C. Detect and remove unused values","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc13-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F11.msc13-c",{"title":4761,"path":4762,"stem":4763},"MSC14-C. Do not introduce unnecessary platform dependencies","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc14-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F12.msc14-c",{"title":4765,"path":4766,"stem":4767},"MSC15-C. Do not depend on undefined behavior","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc15-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F13.msc15-c",{"title":4769,"path":4770,"stem":4771},"MSC17-C. Finish every set of statements associated with a case label with a break statement","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc17-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F14.msc17-c",{"title":4773,"path":4774,"stem":4775},"MSC18-C. Be careful while handling sensitive data, such as passwords, in program code","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc18-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F15.msc18-c",{"title":4777,"path":4778,"stem":4779},"MSC19-C. For functions that return an array, prefer returning an empty array over a null value","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc19-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F16.msc19-c",{"title":4781,"path":4782,"stem":4783},"MSC20-C. Do not use a switch statement to transfer control into a complex block","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc20-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F17.msc20-c",{"title":4785,"path":4786,"stem":4787},"MSC21-C. Use robust loop termination conditions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc21-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F18.msc21-c",{"title":4789,"path":4790,"stem":4791},"MSC22-C. Use the setjmp(), longjmp() facility securely","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc22-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F19.msc22-c",{"title":4793,"path":4794,"stem":4795},"MSC23-C. Beware of vendor-specific library and language differences","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc23-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F20.msc23-c",{"title":4797,"path":4798,"stem":4799},"MSC24-C. Do not use deprecated or obsolescent functions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc24-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F21.msc24-c",{"title":4801,"path":4802,"stem":4803},"MSC25-C. Do not use insecure or weak cryptographic algorithms","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc25-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F22.msc25-c",{"title":4805,"path":4806,"stem":4807},"Use subset of ASCII for safety","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fuse-subset-of-ascii-for-safety","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F23.use-subset-of-ascii-for-safety",{"title":3676,"path":4809,"stem":4810,"children":4811},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fposix-pos","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F16.posix-pos\u002F1.index",[4812,4813,4817,4821,4825],{"title":3676,"path":4809,"stem":4810},{"title":4814,"path":4815,"stem":4816},"POS01-C. Check for the existence of links when dealing with files","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fposix-pos\u002Fpos01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F16.posix-pos\u002F2.pos01-c",{"title":4818,"path":4819,"stem":4820},"POS02-C. Follow the principle of least privilege","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fposix-pos\u002Fpos02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F16.posix-pos\u002F3.pos02-c",{"title":4822,"path":4823,"stem":4824},"POS04-C. Avoid using PTHREAD_MUTEX_NORMAL type mutex locks","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fposix-pos\u002Fpos04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F16.posix-pos\u002F4.pos04-c",{"title":4826,"path":4827,"stem":4828},"POS05-C. Limit access to files by creating a jail","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fposix-pos\u002Fpos05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F16.posix-pos\u002F5.pos05-c",{"title":3746,"path":4830,"stem":4831,"children":4832},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F01.index",[4833,4834,4838,4842,4846,4850,4854,4858,4862,4866,4870,4874,4878,4882],{"title":3746,"path":4830,"stem":4831},{"title":4835,"path":4836,"stem":4837},"PRE00-C. Prefer inline or static functions to function-like macros","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F02.pre00-c",{"title":4839,"path":4840,"stem":4841},"PRE01-C. Use parentheses within macros around parameter names","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F03.pre01-c",{"title":4843,"path":4844,"stem":4845},"PRE02-C. Macro replacement lists should be parenthesized","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F04.pre02-c",{"title":4847,"path":4848,"stem":4849},"PRE04-C. Do not reuse a standard header file name","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F05.pre04-c",{"title":4851,"path":4852,"stem":4853},"PRE05-C. Understand macro replacement when concatenating tokens or performing stringification","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F06.pre05-c",{"title":4855,"path":4856,"stem":4857},"PRE06-C. Enclose header files in an include guard","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F07.pre06-c",{"title":4859,"path":4860,"stem":4861},"PRE07-C. Avoid using repeated question marks","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F08.pre07-c",{"title":4863,"path":4864,"stem":4865},"PRE08-C. Guarantee that header file names are unique","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre08-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F09.pre08-c",{"title":4867,"path":4868,"stem":4869},"PRE09-C. Do not replace secure functions with deprecated or obsolescent functions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre09-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F10.pre09-c",{"title":4871,"path":4872,"stem":4873},"PRE10-C. Wrap multistatement macros in a do-while loop","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre10-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F11.pre10-c",{"title":4875,"path":4876,"stem":4877},"PRE11-C. Do not conclude macro definitions with a semicolon","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre11-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F12.pre11-c",{"title":4879,"path":4880,"stem":4881},"PRE12-C. Do not define unsafe macros","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre12-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F13.pre12-c",{"title":4883,"path":4884,"stem":4885},"PRE13-C. Use the Standard predefined macros to test for versions and features.","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre13-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F14.pre13-c",{"title":3764,"path":4887,"stem":4888,"children":4889},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fsignals-sig","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F18.signals-sig\u002F1.index",[4890,4891,4895,4899],{"title":3764,"path":4887,"stem":4888},{"title":4892,"path":4893,"stem":4894},"SIG00-C. Mask signals handled by noninterruptible signal handlers","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fsignals-sig\u002Fsig00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F18.signals-sig\u002F2.sig00-c",{"title":4896,"path":4897,"stem":4898},"SIG01-C. Understand implementation-specific details regarding signal handler persistence","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fsignals-sig\u002Fsig01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F18.signals-sig\u002F3.sig01-c",{"title":4900,"path":4901,"stem":4902},"SIG02-C. Avoid using signals to implement normal functionality","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fsignals-sig\u002Fsig02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F18.signals-sig\u002F4.sig02-c",{"title":4904,"path":4905,"stem":4906},"CERT manifest files","\u002Fsei-cert-c-coding-standard\u002Fcert-manifest-files","4.sei-cert-c-coding-standard\u002F09.cert-manifest-files",1775657830836]