[{"data":1,"prerenderedAt":4652},["ShallowReactive",2],{"global-navigation":3,"page-\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp43-c":28,"surround-\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp43-c":2869,"sidebar-sei-cert-c-coding-standard":2876},[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":2855,"extension":2856,"meta":2857,"navigation":7,"path":2865,"seo":2866,"stem":2867,"__hash__":2868},"content\u002F4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F12.exp43-c.md","EXP43-C. Avoid undefined behavior when using restrict-qualified pointers",{"type":32,"value":33,"toc":2824},"minimark",[34,38,65,78,84,94,99,105,303,324,328,338,480,487,493,499,502,539,710,740,743,764,908,911,954,1130,1133,1151,1319,1326,1338,1394,1410,1413,1426,1544,1547,1577,1679,1685,1695,1710,1752,1763,1766,1786,1903,1906,1909,1993,1997,2003,2006,2017,2100,2103,2106,2194,2198,2206,2214,2273,2277,2290,2294,2664,2668,2675,2754,2761,2765,2795,2798,2820],[35,36,30],"h1",{"id":37},"exp43-c-avoid-undefined-behavior-when-using-restrict-qualified-pointers",[39,40,41,42,46,47,49,50,52,53,55,56,61,62,64],"p",{},"An object that is accessed through a ",[43,44,45],"code",{},"restrict"," -qualified pointer has a special association with that pointer. This association requires that all accesses to that object use, directly or indirectly, the value of that particular pointer. The intended use of the restrict qualifier is to promote optimization, and deleting all instances of the qualifier from a program does not change its meaning (that is, observable behavior). In the absence of this qualifier, other pointers can alias this object. Caching the value in an object designated through a ",[43,48,45],{}," -qualified pointer is safe at the beginning of the block in which the pointer is declared because no preexisting aliases may also be used to reference that object. The cached value must be restored to the object by the end of the block, where preexisting aliases again become available. New aliases may be formed within the block, but these must all depend on the value of the ",[43,51,45],{}," -qualified pointer so that they can be identified and adjusted to refer to the cached value. For a ",[43,54,45],{}," -qualified pointer at file scope, the block is the body of each function in the file [ ",[57,58,60],"a",{"href":59},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography","Walls 2006"," ]. Developers should be aware that C++ does not support the ",[43,63,45],{}," qualifier, but some C++ compiler implementations support an equivalent qualifier as an extension.",[39,66,67,68,72,73,77],{},"The C Standard [ ",[57,69,71],{"href":70},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-ISO-IEC9899-2024","ISO\u002FIEC 9899:2024"," ] identifies the following ",[57,74,76],{"href":75},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fcc-undefined-behavior#CC.UndefinedBehavior-ub_66","undefined behavior 66"," :",[79,80,81],"blockquote",{},[39,82,83],{},"A restrict-qualified pointer is assigned a value based on another restricted pointer whose associated block neither began execution before the block associated with this pointer, nor ended before the assignment (6.7.4.2).",[39,85,86,87,90,91,93],{},"This is an oversimplification, however, and it is important to review the formal definition of ",[88,89,45],"em",{}," in subclause 6.7.3.1 of the C Standard to properly understand undefined behaviors associated with the use of ",[43,92,45],{}," -qualified pointers.",[95,96,98],"h3",{"id":97},"noncompliant-code-example","Noncompliant Code Example",[39,100,101,102,104],{},"This code example is noncompliant because an assignment is made between two ",[43,103,45],{}," -qualified pointers in the same scope:",[106,107,109],"code-block",{"quality":108},"bad",[110,111,116],"pre",{"className":112,"code":113,"language":114,"meta":115,"style":115},"language-c shiki shiki-themes github-light github-dark monokai","int *restrict a;\nint *restrict b;\n\nextern int c[];\n \nint main(void) {\n  c[0] = 17; \n  c[1] = 18;\n  a = &c[0]; \n  b = &c[1];\n  a = b; \u002F* Undefined behavior *\u002F\n  \u002F* ... *\u002F\n}\n","c","",[43,117,118,135,145,151,169,175,193,219,238,258,277,291,297],{"__ignoreMap":115},[119,120,123,127,131],"span",{"class":121,"line":122},"line",1,[119,124,126],{"class":125},"sq6CD","int",[119,128,130],{"class":129},"sC2Qs"," *restrict",[119,132,134],{"class":133},"sMOD_"," a;\n",[119,136,138,140,142],{"class":121,"line":137},2,[119,139,126],{"class":125},[119,141,130],{"class":129},[119,143,144],{"class":133}," b;\n",[119,146,148],{"class":121,"line":147},3,[119,149,150],{"emptyLinePlaceholder":7},"\n",[119,152,154,157,160,163,166],{"class":121,"line":153},4,[119,155,156],{"class":129},"extern",[119,158,159],{"class":125}," int",[119,161,162],{"class":133}," c",[119,164,165],{"class":129},"[]",[119,167,168],{"class":133},";\n",[119,170,172],{"class":121,"line":171},5,[119,173,174],{"class":133}," \n",[119,176,178,180,184,187,190],{"class":121,"line":177},6,[119,179,126],{"class":125},[119,181,183],{"class":182},"srTi1"," main",[119,185,186],{"class":133},"(",[119,188,189],{"class":125},"void",[119,191,192],{"class":133},") {\n",[119,194,196,200,203,207,210,213,216],{"class":121,"line":195},7,[119,197,199],{"class":198},"sOrwc","  c",[119,201,202],{"class":133},"[",[119,204,206],{"class":205},"s7F3e","0",[119,208,209],{"class":133},"] ",[119,211,212],{"class":129},"=",[119,214,215],{"class":205}," 17",[119,217,218],{"class":133},"; \n",[119,220,222,224,226,229,231,233,236],{"class":121,"line":221},8,[119,223,199],{"class":198},[119,225,202],{"class":133},[119,227,228],{"class":205},"1",[119,230,209],{"class":133},[119,232,212],{"class":129},[119,234,235],{"class":205}," 18",[119,237,168],{"class":133},[119,239,241,244,246,249,251,253,255],{"class":121,"line":240},9,[119,242,243],{"class":133},"  a ",[119,245,212],{"class":129},[119,247,248],{"class":129}," &",[119,250,114],{"class":198},[119,252,202],{"class":133},[119,254,206],{"class":205},[119,256,257],{"class":133},"]; \n",[119,259,261,264,266,268,270,272,274],{"class":121,"line":260},10,[119,262,263],{"class":133},"  b ",[119,265,212],{"class":129},[119,267,248],{"class":129},[119,269,114],{"class":198},[119,271,202],{"class":133},[119,273,228],{"class":205},[119,275,276],{"class":133},"];\n",[119,278,280,282,284,287],{"class":121,"line":279},11,[119,281,243],{"class":133},[119,283,212],{"class":129},[119,285,286],{"class":133}," b;",[119,288,290],{"class":289},"s8-w5"," \u002F* Undefined behavior *\u002F\n",[119,292,294],{"class":121,"line":293},12,[119,295,296],{"class":289},"  \u002F* ... *\u002F\n",[119,298,300],{"class":121,"line":299},13,[119,301,302],{"class":133},"}\n",[39,304,305,306,310,311,313,314,317,318,320,321,323],{},"Note that ",[57,307,309],{"href":308},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fbb-definitions#BB.Definitions-undefinedbehavior","undefined behavior"," occurs only when ",[43,312,57],{}," is assigned to ",[43,315,316],{},"b"," . It is valid for ",[43,319,57],{}," and ",[43,322,316],{}," to point into the same array object, provided the range of elements accessed through one of the pointers does not overlap with the range of elements accessed through the other pointer.",[95,325,327],{"id":326},"compliant-solution","Compliant Solution",[39,329,330,331,333,334,337],{},"One way to eliminate the ",[57,332,309],{"href":308}," is simply to remove the ",[43,335,336],{},"restrict-"," qualification from the affected pointers:",[106,339,341],{"quality":340},"good",[110,342,344],{"className":112,"code":343,"language":114,"meta":115,"style":115},"int *a;\nint *b;\n\nextern int c[];\n \nint main(void) {\n  c[0] = 17; \n  c[1] = 18;\n  a = &c[0]; \n  b = &c[1];\n  a = b; \u002F* Defined behavior *\u002F\n  \u002F* ... *\u002F\n}\n",[43,345,346,356,365,369,381,385,397,413,429,445,461,472,476],{"__ignoreMap":115},[119,347,348,350,353],{"class":121,"line":122},[119,349,126],{"class":125},[119,351,352],{"class":129}," *",[119,354,355],{"class":133},"a;\n",[119,357,358,360,362],{"class":121,"line":137},[119,359,126],{"class":125},[119,361,352],{"class":129},[119,363,364],{"class":133},"b;\n",[119,366,367],{"class":121,"line":147},[119,368,150],{"emptyLinePlaceholder":7},[119,370,371,373,375,377,379],{"class":121,"line":153},[119,372,156],{"class":129},[119,374,159],{"class":125},[119,376,162],{"class":133},[119,378,165],{"class":129},[119,380,168],{"class":133},[119,382,383],{"class":121,"line":171},[119,384,174],{"class":133},[119,386,387,389,391,393,395],{"class":121,"line":177},[119,388,126],{"class":125},[119,390,183],{"class":182},[119,392,186],{"class":133},[119,394,189],{"class":125},[119,396,192],{"class":133},[119,398,399,401,403,405,407,409,411],{"class":121,"line":195},[119,400,199],{"class":198},[119,402,202],{"class":133},[119,404,206],{"class":205},[119,406,209],{"class":133},[119,408,212],{"class":129},[119,410,215],{"class":205},[119,412,218],{"class":133},[119,414,415,417,419,421,423,425,427],{"class":121,"line":221},[119,416,199],{"class":198},[119,418,202],{"class":133},[119,420,228],{"class":205},[119,422,209],{"class":133},[119,424,212],{"class":129},[119,426,235],{"class":205},[119,428,168],{"class":133},[119,430,431,433,435,437,439,441,443],{"class":121,"line":240},[119,432,243],{"class":133},[119,434,212],{"class":129},[119,436,248],{"class":129},[119,438,114],{"class":198},[119,440,202],{"class":133},[119,442,206],{"class":205},[119,444,257],{"class":133},[119,446,447,449,451,453,455,457,459],{"class":121,"line":260},[119,448,263],{"class":133},[119,450,212],{"class":129},[119,452,248],{"class":129},[119,454,114],{"class":198},[119,456,202],{"class":133},[119,458,228],{"class":205},[119,460,276],{"class":133},[119,462,463,465,467,469],{"class":121,"line":279},[119,464,243],{"class":133},[119,466,212],{"class":129},[119,468,286],{"class":133},[119,470,471],{"class":289}," \u002F* Defined behavior *\u002F\n",[119,473,474],{"class":121,"line":293},[119,475,296],{"class":289},[119,477,478],{"class":121,"line":299},[119,479,302],{"class":133},[481,482,484,486],"h2",{"id":483},"restrict-qualified-function-parameters",[43,485,45],{}," -Qualified Function Parameters",[39,488,489,490,492],{},"The ",[43,491,45],{}," qualifier requires that the pointers do not reference overlapping objects. If the objects referenced by arguments to functions overlap (meaning the objects share some common memory addresses), the behavior is undefined.",[39,494,495,496,498],{},"When calling functions that have ",[43,497,45],{}," -qualified function parameters, it is important that the pointer arguments do not reference overlapping objects if one or more of the pointers are used to modify memory. Consequently, it is important to understand the semantics of the function being called.",[95,500,98],{"id":501},"noncompliant-code-example-1",[39,503,504,505,508,509,512,513,515,516,518,519,521,522,515,524,518,526,529,530,532,533,535,536,538],{},"In this noncompliant code example, the function ",[43,506,507],{},"f()"," accepts three parameters. The function copies ",[43,510,511],{},"n"," integers from the ",[43,514,126],{}," array referenced by the ",[43,517,45],{}," -qualified pointer ",[43,520,39],{}," to the ",[43,523,126],{},[43,525,45],{},[43,527,528],{},"q"," . Because the destination array is modified during each execution of the function (for which ",[43,531,511],{}," is nonzero), if the array is accessed through one of the pointer parameters, it cannot also be accessed through the other. Declaring these function parameters as ",[43,534,45],{}," -qualified pointers allows aggressive optimization by the compiler but can also result in ",[57,537,309],{"href":308}," if these pointers refer to overlapping objects.",[106,540,541],{"quality":108},[110,542,544],{"className":112,"code":543,"language":114,"meta":115,"style":115},"#include \u003Cstddef.h>\nvoid f(size_t n, int *restrict p, const int *restrict q) {\n  while (n-- > 0) {\n    *p++ = *q++;\n  }\n}\n \nvoid g(void) {\n  extern int d[100];\n  \u002F* ... *\u002F\n  f(50, d + 1, d); \u002F* Undefined behavior *\u002F\n}\n",[43,545,546,555,595,614,635,640,644,648,661,678,682,706],{"__ignoreMap":115},[119,547,548,551],{"class":121,"line":122},[119,549,550],{"class":129},"#include",[119,552,554],{"class":553},"sstjo"," \u003Cstddef.h>\n",[119,556,557,559,562,564,567,571,574,576,578,581,583,586,588,590,593],{"class":121,"line":137},[119,558,189],{"class":125},[119,560,561],{"class":182}," f",[119,563,186],{"class":133},[119,565,566],{"class":125},"size_t",[119,568,570],{"class":569},"sTHNf"," n",[119,572,573],{"class":133},", ",[119,575,126],{"class":125},[119,577,130],{"class":129},[119,579,580],{"class":569}," p",[119,582,573],{"class":133},[119,584,585],{"class":129},"const",[119,587,159],{"class":125},[119,589,130],{"class":129},[119,591,592],{"class":569}," q",[119,594,192],{"class":133},[119,596,597,600,603,606,609,612],{"class":121,"line":147},[119,598,599],{"class":129},"  while",[119,601,602],{"class":133}," (n",[119,604,605],{"class":129},"--",[119,607,608],{"class":129}," >",[119,610,611],{"class":205}," 0",[119,613,192],{"class":133},[119,615,616,619,621,624,627,629,631,633],{"class":121,"line":153},[119,617,618],{"class":129},"    *",[119,620,39],{"class":133},[119,622,623],{"class":129},"++",[119,625,626],{"class":129}," =",[119,628,352],{"class":129},[119,630,528],{"class":133},[119,632,623],{"class":129},[119,634,168],{"class":133},[119,636,637],{"class":121,"line":171},[119,638,639],{"class":133},"  }\n",[119,641,642],{"class":121,"line":177},[119,643,302],{"class":133},[119,645,646],{"class":121,"line":195},[119,647,174],{"class":133},[119,649,650,652,655,657,659],{"class":121,"line":221},[119,651,189],{"class":125},[119,653,654],{"class":182}," g",[119,656,186],{"class":133},[119,658,189],{"class":125},[119,660,192],{"class":133},[119,662,663,666,668,671,673,676],{"class":121,"line":240},[119,664,665],{"class":129},"  extern",[119,667,159],{"class":125},[119,669,670],{"class":198}," d",[119,672,202],{"class":133},[119,674,675],{"class":205},"100",[119,677,276],{"class":133},[119,679,680],{"class":121,"line":260},[119,681,296],{"class":289},[119,683,684,687,689,692,695,698,701,704],{"class":121,"line":279},[119,685,686],{"class":182},"  f",[119,688,186],{"class":133},[119,690,691],{"class":205},"50",[119,693,694],{"class":133},", d ",[119,696,697],{"class":129},"+",[119,699,700],{"class":205}," 1",[119,702,703],{"class":133},", d);",[119,705,290],{"class":289},[119,707,708],{"class":121,"line":293},[119,709,302],{"class":133},[39,711,712,713,716,717,720,721,723,724,726,727,730,731,734,735,320,737,739],{},"The function ",[43,714,715],{},"g()"," declares an array ",[43,718,719],{},"d"," consisting of 100 ",[43,722,126],{}," values and then invokes ",[43,725,507],{}," to copy memory from one area of the array to another. This call has undefined behavior because each of ",[43,728,729],{},"d[1]"," through ",[43,732,733],{},"d[49]"," is accessed through both ",[43,736,39],{},[43,738,528],{}," .",[95,741,327],{"id":742},"compliant-solution-1",[39,744,745,746,748,749,751,752,754,755,757,758,760,761,763],{},"In this compliant solution, the function ",[43,747,507],{}," is unchanged but the programmer has ensured that none of the calls to ",[43,750,507],{}," result in ",[57,753,309],{"href":308}," . The call to ",[43,756,507],{}," in ",[43,759,715],{}," is valid because the storage allocated to ",[43,762,719],{}," is effectively divided into two disjoint objects.",[106,765,766],{"quality":340},[110,767,769],{"className":112,"code":768,"language":114,"meta":115,"style":115},"#include \u003Cstddef.h>\nvoid f(size_t n, int *restrict p, const int *restrict q) {\n  while (n-- > 0) {\n    *p++ = *q++;\n  } \n}\n \nvoid g(void) {\n  extern int d[100];\n  \u002F* ... *\u002F\n  f(50, d + 50, d); \u002F* Defined behavior  *\u002F\n}\n",[43,770,771,777,809,823,841,846,850,854,866,880,884,904],{"__ignoreMap":115},[119,772,773,775],{"class":121,"line":122},[119,774,550],{"class":129},[119,776,554],{"class":553},[119,778,779,781,783,785,787,789,791,793,795,797,799,801,803,805,807],{"class":121,"line":137},[119,780,189],{"class":125},[119,782,561],{"class":182},[119,784,186],{"class":133},[119,786,566],{"class":125},[119,788,570],{"class":569},[119,790,573],{"class":133},[119,792,126],{"class":125},[119,794,130],{"class":129},[119,796,580],{"class":569},[119,798,573],{"class":133},[119,800,585],{"class":129},[119,802,159],{"class":125},[119,804,130],{"class":129},[119,806,592],{"class":569},[119,808,192],{"class":133},[119,810,811,813,815,817,819,821],{"class":121,"line":147},[119,812,599],{"class":129},[119,814,602],{"class":133},[119,816,605],{"class":129},[119,818,608],{"class":129},[119,820,611],{"class":205},[119,822,192],{"class":133},[119,824,825,827,829,831,833,835,837,839],{"class":121,"line":153},[119,826,618],{"class":129},[119,828,39],{"class":133},[119,830,623],{"class":129},[119,832,626],{"class":129},[119,834,352],{"class":129},[119,836,528],{"class":133},[119,838,623],{"class":129},[119,840,168],{"class":133},[119,842,843],{"class":121,"line":171},[119,844,845],{"class":133},"  } \n",[119,847,848],{"class":121,"line":177},[119,849,302],{"class":133},[119,851,852],{"class":121,"line":195},[119,853,174],{"class":133},[119,855,856,858,860,862,864],{"class":121,"line":221},[119,857,189],{"class":125},[119,859,654],{"class":182},[119,861,186],{"class":133},[119,863,189],{"class":125},[119,865,192],{"class":133},[119,867,868,870,872,874,876,878],{"class":121,"line":240},[119,869,665],{"class":129},[119,871,159],{"class":125},[119,873,670],{"class":198},[119,875,202],{"class":133},[119,877,675],{"class":205},[119,879,276],{"class":133},[119,881,882],{"class":121,"line":260},[119,883,296],{"class":289},[119,885,886,888,890,892,894,896,899,901],{"class":121,"line":279},[119,887,686],{"class":182},[119,889,186],{"class":133},[119,891,691],{"class":205},[119,893,694],{"class":133},[119,895,697],{"class":129},[119,897,898],{"class":205}," 50",[119,900,703],{"class":133},[119,902,903],{"class":289}," \u002F* Defined behavior  *\u002F\n",[119,905,906],{"class":121,"line":293},[119,907,302],{"class":133},[95,909,98],{"id":910},"noncompliant-code-example-2",[39,912,504,913,916,917,919,920,518,922,925,926,928,929,932,933,716,935,720,937,723,939,941,942,945,946,948,949,951,952,739],{},[43,914,915],{},"add()"," adds the integer array referenced by the ",[43,918,45],{}," -qualified pointers lhs to the integer array referenced by the ",[43,921,45],{},[43,923,924],{},"rhs"," and stores the result in the ",[43,927,45],{}," -qualified pointer referenced by ",[43,930,931],{},"res"," . The function ",[43,934,507],{},[43,936,57],{},[43,938,126],{},[43,940,915],{}," to copy memory from one area of the array to another. The call ",[43,943,944],{},"  add(100, a, a, a) "," has ",[57,947,309],{"href":308}," because the object modified by ",[43,950,931],{}," is accessed by lhs and ",[43,953,924],{},[106,955,956],{"quality":108},[110,957,959],{"className":112,"code":958,"language":114,"meta":115,"style":115},"#include \u003Cstddef.h>\n \nvoid add(size_t n, int *restrict res, const int *restrict lhs,\n       const int *restrict rhs) {\n  for (size_t i = 0; i \u003C n; ++i) {\n    res[i] = lhs[i] + rhs[i];\n  }\n}\n \nvoid f(void) {\n  int a[100]; \n  add(100, a, a, a); \u002F* Undefined behavior *\u002F\n}\n",[43,960,961,967,972,1008,1022,1053,1074,1078,1082,1086,1098,1112,1126],{"__ignoreMap":115},[119,962,963,965],{"class":121,"line":122},[119,964,550],{"class":129},[119,966,554],{"class":553},[119,968,969],{"class":121,"line":137},[119,970,971],{"class":133}," \n",[119,973,974,976,979,981,983,985,987,989,991,994,996,998,1000,1002,1005],{"class":121,"line":147},[119,975,189],{"class":125},[119,977,978],{"class":182}," add",[119,980,186],{"class":133},[119,982,566],{"class":125},[119,984,570],{"class":569},[119,986,573],{"class":133},[119,988,126],{"class":125},[119,990,130],{"class":129},[119,992,993],{"class":569}," res",[119,995,573],{"class":133},[119,997,585],{"class":129},[119,999,159],{"class":125},[119,1001,130],{"class":129},[119,1003,1004],{"class":569}," lhs",[119,1006,1007],{"class":133},",\n",[119,1009,1010,1013,1015,1017,1020],{"class":121,"line":153},[119,1011,1012],{"class":129},"       const",[119,1014,159],{"class":125},[119,1016,130],{"class":129},[119,1018,1019],{"class":569}," rhs",[119,1021,192],{"class":133},[119,1023,1024,1027,1030,1032,1035,1037,1039,1042,1045,1048,1050],{"class":121,"line":171},[119,1025,1026],{"class":129},"  for",[119,1028,1029],{"class":133}," (",[119,1031,566],{"class":125},[119,1033,1034],{"class":133}," i ",[119,1036,212],{"class":129},[119,1038,611],{"class":205},[119,1040,1041],{"class":133},"; i ",[119,1043,1044],{"class":129},"\u003C",[119,1046,1047],{"class":133}," n; ",[119,1049,623],{"class":129},[119,1051,1052],{"class":133},"i) {\n",[119,1054,1055,1058,1061,1063,1065,1067,1069,1071],{"class":121,"line":177},[119,1056,1057],{"class":198},"    res",[119,1059,1060],{"class":133},"[i] ",[119,1062,212],{"class":129},[119,1064,1004],{"class":198},[119,1066,1060],{"class":133},[119,1068,697],{"class":129},[119,1070,1019],{"class":198},[119,1072,1073],{"class":133},"[i];\n",[119,1075,1076],{"class":121,"line":195},[119,1077,639],{"class":133},[119,1079,1080],{"class":121,"line":221},[119,1081,302],{"class":133},[119,1083,1084],{"class":121,"line":240},[119,1085,971],{"class":133},[119,1087,1088,1090,1092,1094,1096],{"class":121,"line":260},[119,1089,189],{"class":125},[119,1091,561],{"class":182},[119,1093,186],{"class":133},[119,1095,189],{"class":125},[119,1097,192],{"class":133},[119,1099,1100,1103,1106,1108,1110],{"class":121,"line":279},[119,1101,1102],{"class":125},"  int",[119,1104,1105],{"class":198}," a",[119,1107,202],{"class":133},[119,1109,675],{"class":205},[119,1111,257],{"class":133},[119,1113,1114,1117,1119,1121,1124],{"class":121,"line":293},[119,1115,1116],{"class":182},"  add",[119,1118,186],{"class":133},[119,1120,675],{"class":205},[119,1122,1123],{"class":133},", a, a, a);",[119,1125,290],{"class":289},[119,1127,1128],{"class":121,"line":299},[119,1129,302],{"class":133},[95,1131,327],{"id":1132},"compliant-solution-2",[39,1134,1135,1136,320,1138,1140,1141,1144,1145,1147,1148,739],{},"In this compliant solution, an unmodified object is aliased through two restricted pointers. Because ",[43,1137,57],{},[43,1139,316],{}," are disjoint arrays, a call of the form ",[43,1142,1143],{},"  add(100, a, b, b) "," has defined behavior, because array ",[43,1146,316],{}," is not modified within function ",[43,1149,1150],{},"add",[106,1152,1153],{"quality":340},[110,1154,1156],{"className":112,"code":1155,"language":114,"meta":115,"style":115},"#include \u003Cstddef.h>\nvoid add(size_t n, int *restrict res, const int *restrict lhs,\n         const int *restrict rhs) {\n  for (size_t i = 0; i \u003C n; ++i) {\n    res[i] = lhs[i] + rhs[i];\n  }\n}\n \nvoid f(void) {\n   int a[100]; \n   int b[100];\n   add(100, a, b, b); \u002F* Defined behavior  *\u002F\n}\n",[43,1157,1158,1164,1196,1209,1233,1251,1255,1259,1263,1275,1288,1301,1315],{"__ignoreMap":115},[119,1159,1160,1162],{"class":121,"line":122},[119,1161,550],{"class":129},[119,1163,554],{"class":553},[119,1165,1166,1168,1170,1172,1174,1176,1178,1180,1182,1184,1186,1188,1190,1192,1194],{"class":121,"line":137},[119,1167,189],{"class":125},[119,1169,978],{"class":182},[119,1171,186],{"class":133},[119,1173,566],{"class":125},[119,1175,570],{"class":569},[119,1177,573],{"class":133},[119,1179,126],{"class":125},[119,1181,130],{"class":129},[119,1183,993],{"class":569},[119,1185,573],{"class":133},[119,1187,585],{"class":129},[119,1189,159],{"class":125},[119,1191,130],{"class":129},[119,1193,1004],{"class":569},[119,1195,1007],{"class":133},[119,1197,1198,1201,1203,1205,1207],{"class":121,"line":147},[119,1199,1200],{"class":129},"         const",[119,1202,159],{"class":125},[119,1204,130],{"class":129},[119,1206,1019],{"class":569},[119,1208,192],{"class":133},[119,1210,1211,1213,1215,1217,1219,1221,1223,1225,1227,1229,1231],{"class":121,"line":153},[119,1212,1026],{"class":129},[119,1214,1029],{"class":133},[119,1216,566],{"class":125},[119,1218,1034],{"class":133},[119,1220,212],{"class":129},[119,1222,611],{"class":205},[119,1224,1041],{"class":133},[119,1226,1044],{"class":129},[119,1228,1047],{"class":133},[119,1230,623],{"class":129},[119,1232,1052],{"class":133},[119,1234,1235,1237,1239,1241,1243,1245,1247,1249],{"class":121,"line":171},[119,1236,1057],{"class":198},[119,1238,1060],{"class":133},[119,1240,212],{"class":129},[119,1242,1004],{"class":198},[119,1244,1060],{"class":133},[119,1246,697],{"class":129},[119,1248,1019],{"class":198},[119,1250,1073],{"class":133},[119,1252,1253],{"class":121,"line":177},[119,1254,639],{"class":133},[119,1256,1257],{"class":121,"line":195},[119,1258,302],{"class":133},[119,1260,1261],{"class":121,"line":221},[119,1262,971],{"class":133},[119,1264,1265,1267,1269,1271,1273],{"class":121,"line":240},[119,1266,189],{"class":125},[119,1268,561],{"class":182},[119,1270,186],{"class":133},[119,1272,189],{"class":125},[119,1274,192],{"class":133},[119,1276,1277,1280,1282,1284,1286],{"class":121,"line":260},[119,1278,1279],{"class":125},"   int",[119,1281,1105],{"class":198},[119,1283,202],{"class":133},[119,1285,675],{"class":205},[119,1287,257],{"class":133},[119,1289,1290,1292,1295,1297,1299],{"class":121,"line":279},[119,1291,1279],{"class":125},[119,1293,1294],{"class":198}," b",[119,1296,202],{"class":133},[119,1298,675],{"class":205},[119,1300,276],{"class":133},[119,1302,1303,1306,1308,1310,1313],{"class":121,"line":293},[119,1304,1305],{"class":182},"   add",[119,1307,186],{"class":133},[119,1309,675],{"class":205},[119,1311,1312],{"class":133},", a, b, b);",[119,1314,903],{"class":289},[119,1316,1317],{"class":121,"line":299},[119,1318,302],{"class":133},[481,1320,1322,1323,1325],{"id":1321},"invoking-library-functions-with-restrict-qualified-pointers","Invoking Library Functions with ",[43,1324,45],{}," -Qualified Pointers",[39,1327,1328,1329,1331,1332,1334,1335,1337],{},"Ensure that ",[43,1330,45],{}," -qualified source and destination pointers do not reference overlapping objects when invoking library functions. For example, the following table lists C standard library functions that copy memory from a source object referenced by a ",[43,1333,45],{}," -qualified pointer to a destination object that is also referenced by a ",[43,1336,45],{}," -qualified pointer:",[1339,1340,1341,1350],"table",{},[1342,1343,1344],"thead",{},[1345,1346,1347],"tr",{},[1348,1349],"th",{},[1351,1352,1353,1359,1366,1373,1380,1387],"tbody",{},[1345,1354,1355],{},[1356,1357,1358],"td",{},"Standard C",[1345,1360,1361],{},[1356,1362,1363],{},[43,1364,1365],{},"strcpy()",[1345,1367,1368],{},[1356,1369,1370],{},[43,1371,1372],{},"strncpy()",[1345,1374,1375],{},[1356,1376,1377],{},[43,1378,1379],{},"strcat()",[1345,1381,1382],{},[1356,1383,1384],{},[43,1385,1386],{},"strncat()",[1345,1388,1389],{},[1356,1390,1391],{},[43,1392,1393],{},"memcpy()",[39,1395,1396,1397,1400,1401,1405,1406,1409],{},"If the objects referenced by arguments to functions overlap (meaning the objects share some common memory addresses), the behavior is ",[57,1398,1399],{"href":308},"undefined"," . (See also ",[57,1402,1404],{"href":1403},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fcc-undefined-behavior#CC.UndefinedBehavior-ub_65","undefined behavior 65"," .) The result of the functions is unknown, and data may be corrupted. As a result, these functions must never be passed pointers to overlapping objects. If data must be copied between objects that share common memory addresses, a copy function guaranteed to work on overlapping memory, such as ",[43,1407,1408],{},"memmove()"," , should be used.",[95,1411,98],{"id":1412},"noncompliant-code-example-3",[39,1414,1415,1416,320,1419,1422,1423,1425],{},"In this noncompliant code example, the values of objects referenced by ",[43,1417,1418],{},"ptr1",[43,1420,1421],{},"ptr2"," become unpredictable after the call to ",[43,1424,1393],{}," because their memory areas overlap:",[106,1427,1428],{"quality":108},[110,1429,1431],{"className":112,"code":1430,"language":114,"meta":115,"style":115},"#include \u003Cstring.h>\n \nvoid func(void) {\n  char c_str[]= \"test string\";\n  char *ptr1 = c_str;\n  char *ptr2;\n\n  ptr2 = ptr1 + 3;\n  \u002F* Undefined behavior because of overlapping objects *\u002F\n  memcpy(ptr2, ptr1, 6);  \n  \u002F* ... *\u002F\n}\n",[43,1432,1433,1440,1444,1457,1473,1487,1496,1500,1517,1522,1536,1540],{"__ignoreMap":115},[119,1434,1435,1437],{"class":121,"line":122},[119,1436,550],{"class":129},[119,1438,1439],{"class":553}," \u003Cstring.h>\n",[119,1441,1442],{"class":121,"line":137},[119,1443,174],{"class":133},[119,1445,1446,1448,1451,1453,1455],{"class":121,"line":147},[119,1447,189],{"class":125},[119,1449,1450],{"class":182}," func",[119,1452,186],{"class":133},[119,1454,189],{"class":125},[119,1456,192],{"class":133},[119,1458,1459,1462,1465,1468,1471],{"class":121,"line":153},[119,1460,1461],{"class":125},"  char",[119,1463,1464],{"class":133}," c_str",[119,1466,1467],{"class":129},"[]=",[119,1469,1470],{"class":553}," \"test string\"",[119,1472,168],{"class":133},[119,1474,1475,1477,1479,1482,1484],{"class":121,"line":171},[119,1476,1461],{"class":125},[119,1478,352],{"class":129},[119,1480,1481],{"class":133},"ptr1 ",[119,1483,212],{"class":129},[119,1485,1486],{"class":133}," c_str;\n",[119,1488,1489,1491,1493],{"class":121,"line":177},[119,1490,1461],{"class":125},[119,1492,352],{"class":129},[119,1494,1495],{"class":133},"ptr2;\n",[119,1497,1498],{"class":121,"line":195},[119,1499,150],{"emptyLinePlaceholder":7},[119,1501,1502,1505,1507,1510,1512,1515],{"class":121,"line":221},[119,1503,1504],{"class":133},"  ptr2 ",[119,1506,212],{"class":129},[119,1508,1509],{"class":133}," ptr1 ",[119,1511,697],{"class":129},[119,1513,1514],{"class":205}," 3",[119,1516,168],{"class":133},[119,1518,1519],{"class":121,"line":240},[119,1520,1521],{"class":289},"  \u002F* Undefined behavior because of overlapping objects *\u002F\n",[119,1523,1524,1527,1530,1533],{"class":121,"line":260},[119,1525,1526],{"class":182},"  memcpy",[119,1528,1529],{"class":133},"(ptr2, ptr1, ",[119,1531,1532],{"class":205},"6",[119,1534,1535],{"class":133},");  \n",[119,1537,1538],{"class":121,"line":279},[119,1539,296],{"class":289},[119,1541,1542],{"class":121,"line":293},[119,1543,302],{"class":133},[95,1545,327],{"id":1546},"compliant-solution-3",[39,1548,1549,1550,1552,1553,1555,1556,1558,1559,1561,1562,1564,1565,1567,1568,1570,1571,1573,1574,1576],{},"In this compliant solution, the call to ",[43,1551,1393],{}," is replaced with a call to ",[43,1554,1408],{}," . The ",[43,1557,1408],{}," function performs the same operation as ",[43,1560,1393],{}," when the memory regions do not overlap. When the memory regions do overlap, the ",[88,1563,511],{}," characters from the object pointed to by the source ( ",[43,1566,1418],{}," ) are first copied into a temporary array of ",[88,1569,511],{}," characters that does not overlap the objects pointed to by the destination ( ",[43,1572,1421],{}," ) or the source. The ",[88,1575,511],{}," characters from the temporary array are then copied into the object pointed to by the destination.",[106,1578,1579],{"quality":340},[110,1580,1582],{"className":112,"code":1581,"language":114,"meta":115,"style":115},"#include \u003Cstring.h>\n\nvoid func(void) {\n  char c_str[]= \"test string\";\n  char *ptr1 = c_str;\n  char *ptr2;\n\n  ptr2 = ptr1 + 3;\n  memmove(ptr2, ptr1, 6);  \u002F* Replace call to memcpy() *\u002F\n  \u002F* ... *\u002F\n}\n",[43,1583,1584,1590,1594,1606,1618,1630,1638,1642,1656,1671,1675],{"__ignoreMap":115},[119,1585,1586,1588],{"class":121,"line":122},[119,1587,550],{"class":129},[119,1589,1439],{"class":553},[119,1591,1592],{"class":121,"line":137},[119,1593,150],{"emptyLinePlaceholder":7},[119,1595,1596,1598,1600,1602,1604],{"class":121,"line":147},[119,1597,189],{"class":125},[119,1599,1450],{"class":182},[119,1601,186],{"class":133},[119,1603,189],{"class":125},[119,1605,192],{"class":133},[119,1607,1608,1610,1612,1614,1616],{"class":121,"line":153},[119,1609,1461],{"class":125},[119,1611,1464],{"class":133},[119,1613,1467],{"class":129},[119,1615,1470],{"class":553},[119,1617,168],{"class":133},[119,1619,1620,1622,1624,1626,1628],{"class":121,"line":171},[119,1621,1461],{"class":125},[119,1623,352],{"class":129},[119,1625,1481],{"class":133},[119,1627,212],{"class":129},[119,1629,1486],{"class":133},[119,1631,1632,1634,1636],{"class":121,"line":177},[119,1633,1461],{"class":125},[119,1635,352],{"class":129},[119,1637,1495],{"class":133},[119,1639,1640],{"class":121,"line":195},[119,1641,150],{"emptyLinePlaceholder":7},[119,1643,1644,1646,1648,1650,1652,1654],{"class":121,"line":221},[119,1645,1504],{"class":133},[119,1647,212],{"class":129},[119,1649,1509],{"class":133},[119,1651,697],{"class":129},[119,1653,1514],{"class":205},[119,1655,168],{"class":133},[119,1657,1658,1661,1663,1665,1668],{"class":121,"line":240},[119,1659,1660],{"class":182},"  memmove",[119,1662,1529],{"class":133},[119,1664,1532],{"class":205},[119,1666,1667],{"class":133},");",[119,1669,1670],{"class":289},"  \u002F* Replace call to memcpy() *\u002F\n",[119,1672,1673],{"class":121,"line":260},[119,1674,296],{"class":289},[119,1676,1677],{"class":121,"line":279},[119,1678,302],{"class":133},[39,1680,1681,1682,1684],{},"Similar solutions using ",[43,1683,1408],{}," can replace the string functions as long as care is taken regarding the byte size of the characters and proper null-termination of the copied string.",[481,1686,1688,1689,1691,1692,1694],{"id":1687},"calling-functions-with-restrict-qualified-pointer-to-a-const-qualified-type","Calling Functions with ",[43,1690,45],{}," -Qualified Pointer to a ",[43,1693,585],{}," -Qualified Type",[39,1696,1697,1698,1700,1701,1703,1704,1706,1707,1709],{},"Ensure that functions that accept a ",[43,1699,45],{}," -qualified pointer to a ",[43,1702,585],{}," -qualified type do not modify the object referenced by that pointer. Formatted input and output standard library functions frequently fit this description. The following table lists of some of the common functions for which the format argument is a ",[43,1705,45],{}," -qualified pointer to a ",[43,1708,585],{}," -qualified type.",[1339,1711,1712,1718],{},[1342,1713,1714],{},[1345,1715,1716],{},[1348,1717],{},[1351,1719,1720,1724,1731,1738,1745],{},[1345,1721,1722],{},[1356,1723,1358],{},[1345,1725,1726],{},[1356,1727,1728],{},[43,1729,1730],{},"printf()",[1345,1732,1733],{},[1356,1734,1735],{},[43,1736,1737],{},"scanf()",[1345,1739,1740],{},[1356,1741,1742],{},[43,1743,1744],{},"sprintf()",[1345,1746,1747],{},[1356,1748,1749],{},[43,1750,1751],{},"snprintf()",[39,1753,1754,1755,1757,1758,1762],{},"For formatted output functions such as ",[43,1756,1730],{}," , it is unlikely that a programmer would modify the format string. However, an attacker may attempt to do so if a program violates ",[57,1759,1761],{"href":1760},"\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio30-c","FIO30-C. Exclude user input from format strings"," and passes tainted values as part of the format string.",[95,1764,98],{"id":1765},"noncompliant-code-example-4",[39,1767,1768,1769,1772,1773,1776,1777,1780,1781,320,1783,77],{},"In this noncompliant code example, the programmer is attempting to overwrite the format string with a string value read in from ",[43,1770,1771],{},"stdin"," such as ",[43,1774,1775],{},"  \"%d%f 1 3.3\" "," and use the resulting modified string of ",[43,1778,1779],{},"\"%s%d%f\""," to input the subsequent values of ",[43,1782,228],{},[43,1784,1785],{},"3.3",[106,1787,1788],{"quality":108},[110,1789,1791],{"className":112,"code":1790,"language":114,"meta":115,"style":115},"#include \u003Cstdio.h>\n \nvoid func(void) {\n  int i;\n  float x;\n  char format[100] = \"%s\";\n  \u002F* Undefined behavior *\u002F\n  int n = scanf(format, format + 2, &i, &x); \n  \u002F* ... *\u002F\n}\n",[43,1792,1793,1800,1804,1816,1823,1831,1857,1862,1895,1899],{"__ignoreMap":115},[119,1794,1795,1797],{"class":121,"line":122},[119,1796,550],{"class":129},[119,1798,1799],{"class":553}," \u003Cstdio.h>\n",[119,1801,1802],{"class":121,"line":137},[119,1803,971],{"class":133},[119,1805,1806,1808,1810,1812,1814],{"class":121,"line":147},[119,1807,189],{"class":125},[119,1809,1450],{"class":182},[119,1811,186],{"class":133},[119,1813,189],{"class":125},[119,1815,192],{"class":133},[119,1817,1818,1820],{"class":121,"line":153},[119,1819,1102],{"class":125},[119,1821,1822],{"class":133}," i;\n",[119,1824,1825,1828],{"class":121,"line":171},[119,1826,1827],{"class":125},"  float",[119,1829,1830],{"class":133}," x;\n",[119,1832,1833,1835,1838,1840,1842,1844,1846,1849,1852,1855],{"class":121,"line":177},[119,1834,1461],{"class":125},[119,1836,1837],{"class":198}," format",[119,1839,202],{"class":133},[119,1841,675],{"class":205},[119,1843,209],{"class":133},[119,1845,212],{"class":129},[119,1847,1848],{"class":553}," \"",[119,1850,1851],{"class":205},"%s",[119,1853,1854],{"class":553},"\"",[119,1856,168],{"class":133},[119,1858,1859],{"class":121,"line":195},[119,1860,1861],{"class":289},"  \u002F* Undefined behavior *\u002F\n",[119,1863,1864,1866,1869,1871,1874,1877,1879,1882,1884,1887,1890,1892],{"class":121,"line":221},[119,1865,1102],{"class":125},[119,1867,1868],{"class":133}," n ",[119,1870,212],{"class":129},[119,1872,1873],{"class":182}," scanf",[119,1875,1876],{"class":133},"(format, format ",[119,1878,697],{"class":129},[119,1880,1881],{"class":205}," 2",[119,1883,573],{"class":133},[119,1885,1886],{"class":129},"&",[119,1888,1889],{"class":133},"i, ",[119,1891,1886],{"class":129},[119,1893,1894],{"class":133},"x); \n",[119,1896,1897],{"class":121,"line":240},[119,1898,296],{"class":289},[119,1900,1901],{"class":121,"line":260},[119,1902,302],{"class":133},[95,1904,327],{"id":1905},"compliant-solution-4",[39,1907,1908],{},"The intended results are achieved by this compliant solution:",[106,1910,1911],{"quality":340},[110,1912,1914],{"className":112,"code":1913,"language":114,"meta":115,"style":115},"#include \u003Cstdio.h>\n \nvoid func(void) {\n  int i;\n  float x;\n  int n = scanf(\"%d%f\", &i, &x); \u002F* Defined behavior  *\u002F \n  \u002F* ... *\u002F\n}\n",[43,1915,1916,1922,1926,1938,1944,1950,1985,1989],{"__ignoreMap":115},[119,1917,1918,1920],{"class":121,"line":122},[119,1919,550],{"class":129},[119,1921,1799],{"class":553},[119,1923,1924],{"class":121,"line":137},[119,1925,971],{"class":133},[119,1927,1928,1930,1932,1934,1936],{"class":121,"line":147},[119,1929,189],{"class":125},[119,1931,1450],{"class":182},[119,1933,186],{"class":133},[119,1935,189],{"class":125},[119,1937,192],{"class":133},[119,1939,1940,1942],{"class":121,"line":153},[119,1941,1102],{"class":125},[119,1943,1822],{"class":133},[119,1945,1946,1948],{"class":121,"line":171},[119,1947,1827],{"class":125},[119,1949,1830],{"class":133},[119,1951,1952,1954,1956,1958,1960,1962,1964,1967,1969,1971,1973,1975,1977,1980,1983],{"class":121,"line":177},[119,1953,1102],{"class":125},[119,1955,1868],{"class":133},[119,1957,212],{"class":129},[119,1959,1873],{"class":182},[119,1961,186],{"class":133},[119,1963,1854],{"class":553},[119,1965,1966],{"class":205},"%d%f",[119,1968,1854],{"class":553},[119,1970,573],{"class":133},[119,1972,1886],{"class":129},[119,1974,1889],{"class":133},[119,1976,1886],{"class":129},[119,1978,1979],{"class":133},"x);",[119,1981,1982],{"class":289}," \u002F* Defined behavior  *\u002F",[119,1984,971],{"class":133},[119,1986,1987],{"class":121,"line":195},[119,1988,296],{"class":289},[119,1990,1991],{"class":121,"line":221},[119,1992,302],{"class":133},[481,1994,1996],{"id":1995},"outer-to-inner-assignments-between-restricted-pointers","Outer-to-Inner Assignments between Restricted Pointers",[39,1998,1999,2000,2002],{},"The assignment between ",[43,2001,45],{}," -qualified pointers declared in an inner nested block from an outer block has defined behavior.",[95,2004,98],{"id":2005},"noncompliant-code-example-5",[39,2007,2008,2009,2011,2012,2014,2015,77],{},"The assignment of ",[43,2010,45],{}," -qualified pointers to other ",[43,2013,45],{}," -qualified pointers within the same block has ",[57,2016,309],{"href":308},[106,2018,2019],{"quality":108},[110,2020,2022],{"className":112,"code":2021,"language":114,"meta":115,"style":115},"void func(void) {\n  int *restrict p1;\n  int *restrict q1;\n\n  int *restrict p2 = p1; \u002F* Undefined behavior *\u002F \n  int *restrict q2 = q1; \u002F* Undefined behavior *\u002F \n }\n",[43,2023,2024,2036,2045,2054,2058,2077,2095],{"__ignoreMap":115},[119,2025,2026,2028,2030,2032,2034],{"class":121,"line":122},[119,2027,189],{"class":125},[119,2029,1450],{"class":182},[119,2031,186],{"class":133},[119,2033,189],{"class":125},[119,2035,192],{"class":133},[119,2037,2038,2040,2042],{"class":121,"line":137},[119,2039,1102],{"class":125},[119,2041,130],{"class":129},[119,2043,2044],{"class":133}," p1;\n",[119,2046,2047,2049,2051],{"class":121,"line":147},[119,2048,1102],{"class":125},[119,2050,130],{"class":129},[119,2052,2053],{"class":133}," q1;\n",[119,2055,2056],{"class":121,"line":153},[119,2057,150],{"emptyLinePlaceholder":7},[119,2059,2060,2062,2064,2067,2069,2072,2075],{"class":121,"line":171},[119,2061,1102],{"class":125},[119,2063,130],{"class":129},[119,2065,2066],{"class":133}," p2 ",[119,2068,212],{"class":129},[119,2070,2071],{"class":133}," p1;",[119,2073,2074],{"class":289}," \u002F* Undefined behavior *\u002F",[119,2076,174],{"class":133},[119,2078,2079,2081,2083,2086,2088,2091,2093],{"class":121,"line":177},[119,2080,1102],{"class":125},[119,2082,130],{"class":129},[119,2084,2085],{"class":133}," q2 ",[119,2087,212],{"class":129},[119,2089,2090],{"class":133}," q1;",[119,2092,2074],{"class":289},[119,2094,174],{"class":133},[119,2096,2097],{"class":121,"line":195},[119,2098,2099],{"class":133}," }\n",[95,2101,327],{"id":2102},"compliant-solution-5",[39,2104,2105],{},"The intended results can be achieved using an inner nested block, as shown in this compliant solution:",[106,2107,2108],{"quality":340},[110,2109,2111],{"className":112,"code":2110,"language":114,"meta":115,"style":115},"void func(void) {\n  int *restrict p1;   \n  int *restrict q1;\n  {  \u002F* Added inner block *\u002F\n    int *restrict p2 = p1; \u002F* Valid, well-defined behavior *\u002F    \n    int *restrict q2 = q1; \u002F* Valid, well-defined behavior *\u002F \n  }\n}\n",[43,2112,2113,2126,2135,2143,2151,2170,2186,2190],{"__ignoreMap":115},[119,2114,2115,2117,2119,2121,2123],{"class":121,"line":122},[119,2116,189],{"class":125},[119,2118,1450],{"class":182},[119,2120,186],{"class":133},[119,2122,189],{"class":125},[119,2124,2125],{"class":133},") {\n",[119,2127,2128,2130,2132],{"class":121,"line":137},[119,2129,1102],{"class":125},[119,2131,130],{"class":129},[119,2133,2134],{"class":133}," p1;   \n",[119,2136,2137,2139,2141],{"class":121,"line":147},[119,2138,1102],{"class":125},[119,2140,130],{"class":129},[119,2142,2053],{"class":133},[119,2144,2145,2148],{"class":121,"line":153},[119,2146,2147],{"class":133},"  {",[119,2149,2150],{"class":289},"  \u002F* Added inner block *\u002F\n",[119,2152,2153,2156,2158,2160,2162,2164,2167],{"class":121,"line":171},[119,2154,2155],{"class":125},"    int",[119,2157,130],{"class":129},[119,2159,2066],{"class":133},[119,2161,212],{"class":129},[119,2163,2071],{"class":133},[119,2165,2166],{"class":289}," \u002F* Valid, well-defined behavior *\u002F",[119,2168,2169],{"class":133},"    \n",[119,2171,2172,2174,2176,2178,2180,2182,2184],{"class":121,"line":177},[119,2173,2155],{"class":125},[119,2175,130],{"class":129},[119,2177,2085],{"class":133},[119,2179,212],{"class":129},[119,2181,2090],{"class":133},[119,2183,2166],{"class":289},[119,2185,174],{"class":133},[119,2187,2188],{"class":121,"line":195},[119,2189,639],{"class":133},[119,2191,2192],{"class":121,"line":221},[119,2193,302],{"class":133},[481,2195,2197],{"id":2196},"risk-assessment","Risk Assessment",[39,2199,2200,2201,2203,2204],{},"The incorrect use of ",[43,2202,45],{}," -qualified pointers can result in ",[57,2205,76],{"href":75},[39,2207,2208,2209,2213],{},"that might be ",[57,2210,2212],{"href":2211},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fbb-definitions#BB.Definitions-vulnerability","exploited"," to cause data integrity violations.",[1339,2215,2216,2217,2216,2244],{},"\n  ",[1342,2218,2219,2220,2216],{},"\n    ",[1345,2221,2222,2223,2222,2226,2222,2229,2222,2232,2222,2235,2222,2238,2222,2241,2219],{},"\n      ",[1348,2224,2225],{},"Rule",[1348,2227,2228],{},"Severity",[1348,2230,2231],{},"Likelihood",[1348,2233,2234],{},"Detectable",[1348,2236,2237],{},"Repairable",[1348,2239,2240],{},"Priority",[1348,2242,2243],{},"Level",[1351,2245,2219,2246,2216],{},[1345,2247,2222,2248,2222,2251,2222,2254,2222,2257,2222,2260,2222,2262,2222,2268,2219],{},[1356,2249,2250],{},"EXP43-C",[1356,2252,2253],{},"Medium",[1356,2255,2256],{},"Probable",[1356,2258,2259],{},"No",[1356,2261,2259],{},[1356,2263,2265],{"style":2264},"color: #27ae60;",[316,2266,2267],{},"P4",[1356,2269,2270],{"style":2264},[316,2271,2272],{},"L3",[95,2274,2276],{"id":2275},"related-vulnerabilities","Related Vulnerabilities",[39,2278,2279,2280,2283,2284,739],{},"Search for ",[57,2281,2282],{"href":2211},"vulnerabilities"," resulting from the violation of this rule on the ",[57,2285,2289],{"href":2286,"rel":2287},"https:\u002F\u002Fwww.kb.cert.org\u002Fvulnotes\u002Fbymetric?searchview&query=FIELD+KEYWORDS+contains+EXP43-C",[2288],"nofollow","CERT website",[95,2291,2293],{"id":2292},"automated-detection","Automated Detection",[1339,2295,2298],{"className":2296},[2297],"wrapped",[1351,2299,2300,2324,2350,2374,2399,2426,2449,2475,2500,2525,2549,2578,2608,2630],{},[1345,2301,2304,2309,2314,2319],{"className":2302},[2303],"header",[1348,2305,2306],{},[39,2307,2308],{},"Tool",[1348,2310,2311],{},[39,2312,2313],{},"Version",[1348,2315,2316],{},[39,2317,2318],{},"Checker",[1348,2320,2321],{},[39,2322,2323],{},"Description",[1345,2325,2328,2334,2342,2347],{"className":2326},[2327],"odd",[1356,2329,2330],{},[57,2331,2333],{"href":2332},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fastree","Astrée",[1356,2335,2336],{},[2337,2338,2341],"div",{"className":2339},[2340],"content-wrapper","25.10",[1356,2343,2344],{},[2345,2346,45],"strong",{},[1356,2348,2349],{},"Supported indirectly via MISRA C:2012 Rule 8.14.",[1345,2351,2354,2360,2366,2371],{"className":2352},[2353],"even",[1356,2355,2356],{},[57,2357,2359],{"href":2358},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcodesonar","CodeSonar",[1356,2361,2362],{},[2337,2363,2365],{"className":2364},[2340],"9.1p0",[1356,2367,2368],{},[2345,2369,2370],{},"LANG.TYPE.RESTRICT",[1356,2372,2373],{},"Restrict qualifier used",[1345,2375,2377,2383,2389,2396],{"className":2376},[2327],[1356,2378,2379],{},[57,2380,2382],{"href":2381},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcoverity","Coverity",[1356,2384,2385],{},[2337,2386,2388],{"className":2387},[2340],"2017.07",[1356,2390,2391],{},[39,2392,2393],{},[2345,2394,2395],{},"MISRA C 2012 Rule 8.14",[1356,2397,2398],{},"Partially implemented",[1345,2400,2402,2408,2416,2421],{"className":2401},[2353],[1356,2403,2404],{},[57,2405,2407],{"href":2406},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcppcheck-premium","Cppcheck Premium",[1356,2409,2410],{},[2337,2411,2413],{"className":2412},[2340],[39,2414,2415],{},"24.11.0",[1356,2417,2418],{},[2345,2419,2420],{},"premium-cert-exp43-c",[1356,2422,2423],{},[2424,2425],"br",{},[1345,2427,2429,2435,2441,2446],{"className":2428},[2327],[1356,2430,2431],{},[57,2432,2434],{"href":2433},"http:\u002F\u002Fgcc.gnu.org\u002F","GCC",[1356,2436,2437],{},[57,2438,2440],{"href":2439},"https:\u002F\u002Fgcc.gnu.org\u002Fgcc-8","8.1",[1356,2442,2443],{},[43,2444,2445],{},"             -Wrestrict           ",[1356,2447,2448],{},"Fully implemented",[1345,2450,2452,2458,2466,2471],{"className":2451},[2353],[1356,2453,2454],{},[57,2455,2457],{"href":2456},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fhelix-qac","Helix QAC",[1356,2459,2460],{},[2337,2461,2463],{"className":2462},[2340],[39,2464,2465],{},"2025.2",[1356,2467,2468],{},[2345,2469,2470],{},"C1057",[1356,2472,2473],{},[2424,2474],{},[1345,2476,2478,2484,2491,2496],{"className":2477},[2327],[1356,2479,2480],{},[57,2481,2483],{"href":2482},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fklocwork","Klocwork",[1356,2485,2486],{},[2337,2487,2489],{"className":2488},[2340],[39,2490,2465],{},[1356,2492,2493],{},[2345,2494,2495],{},"MISRA.TYPE.RESTRICT.QUAL.2012",[1356,2497,2498],{},[2424,2499],{},[1345,2501,2503,2509,2515,2522],{"className":2502},[2353],[1356,2504,2505],{},[57,2506,2508],{"href":2507},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fldra","LDRA tool suite",[1356,2510,2511],{},[2337,2512,2514],{"className":2513},[2340],"9.7.1",[1356,2516,2517],{},[39,2518,2519],{},[2345,2520,2521],{},"480 S, 489 S, 613 S",[1356,2523,2524],{},"Enhanced enforcement",[1345,2526,2528,2534,2539,2546],{"className":2527},[2327],[1356,2529,2530],{},[57,2531,2533],{"href":2532},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fparasoft","Parasoft C\u002FC++test",[1356,2535,2536],{},[2337,2537,2465],{"className":2538},[2340],[1356,2540,2541],{},[39,2542,2543],{},[2345,2544,2545],{},"CERT_C-EXP43-a",[1356,2547,2548],{},"The restrict type qualifier shall not be used",[1345,2550,2552,2558,2566,2573],{"className":2551},[2353],[1356,2553,2554],{},[57,2555,2557],{"href":2556},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fpc-lint-plus","PC-lint Plus",[1356,2559,2560],{},[2337,2561,2563],{"className":2562},[2340],[39,2564,2565],{},"1.4",[1356,2567,2568],{},[39,2569,2570],{},[2345,2571,2572],{},"586",[1356,2574,2575],{},[39,2576,2577],{},"Assistance provided: reports use of the restrict keyword",[1345,2579,2581,2587,2595,2603],{"className":2580},[2327],[1356,2582,2583],{},[57,2584,2586],{"href":2585},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fpolyspace-bug-finder","Polyspace Bug Finder",[1356,2588,2589],{},[2337,2590,2592],{"className":2591},[2340],[39,2593,2594],{},"R2025b",[1356,2596,2597],{},[39,2598,2599],{},[57,2600,2602],{"href":2601},"https:\u002F\u002Fwww.mathworks.com\u002Fhelp\u002Fbugfinder\u002Fref\u002Fcertcruleexp43c.html","CERT C: Rule EXP43-C",[1356,2604,2605],{},[39,2606,2607],{},"Checks for copy of overlapping memory (rule partially covered)",[1345,2609,2611,2617,2624,2628],{"className":2610},[2353],[1356,2612,2613],{},[57,2614,2616],{"href":2615},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Frulechecker","RuleChecker",[1356,2618,2619],{},[2337,2620,2622],{"className":2621},[2340],[39,2623,2341],{},[1356,2625,2626],{},[2345,2627,45],{},[1356,2629,2349],{},[1345,2631,2633,2639,2645,2653],{"className":2632},[2327],[1356,2634,2635],{},[57,2636,2638],{"href":2637},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fsonarqube-ccpp-plugin","SonarQube C\u002FC++ Plugin",[1356,2640,2641],{},[2337,2642,2644],{"className":2643},[2340],"3.11",[1356,2646,2647],{},[2345,2648,2649],{},[57,2650,2652],{"href":2651},"https:\u002F\u002Fwww.sonarsource.com\u002Fproducts\u002Fcodeanalyzers\u002Fsonarcfamilyforcpp\u002Frules-c.html#RSPEC-1836","S1836",[1356,2654,2655,2656,2660,2661],{},"Implements ",[57,2657,2659],{"href":2658},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-MISRA12","MISRA C:2012"," Rule 8.14 to flag uses of ",[43,2662,2663],{},"      restrict     ",[481,2665,2667],{"id":2666},"related-guidelines","Related Guidelines",[39,2669,2670,2674],{},[57,2671,2673],{"href":2672},"\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fhow-this-coding-standard-is-organized#HowthisCodingStandardisOrganized-RelatedGuidelines","Key here"," (explains table format and definitions)",[1339,2676,2677,2687],{},[1342,2678,2679],{},[1345,2680,2681,2683,2685],{},[1348,2682],{},[1348,2684],{},[1348,2686],{},[1351,2688,2689,2700,2714,2727,2740],{},[1345,2690,2691,2694,2697],{},[1356,2692,2693],{},"Taxonomy",[1356,2695,2696],{},"Taxonomy item",[1356,2698,2699],{},"Relationship",[1345,2701,2702,2707,2711],{},[1356,2703,2704],{},[57,2705,2706],{"href":17},"CERT C Secure Coding Standard",[1356,2708,2709],{},[57,2710,1761],{"href":1760},[1356,2712,2713],{},"Prior to 2018-01-12: CERT: Unspecified Relationship",[1345,2715,2716,2722,2725],{},[1356,2717,2718],{},[57,2719,2721],{"href":2720},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-ISO-IECTR24772-2013","ISO\u002FIEC TR 24772:2013",[1356,2723,2724],{},"Passing Parameters and Return Values [CSJ]",[1356,2726,2713],{},[1345,2728,2729,2735,2738],{},[1356,2730,2731],{},[57,2732,2734],{"href":2733},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-ISO-IECTS17961","ISO\u002FIEC TS 17961",[1356,2736,2737],{},"Passing pointers into the same object as arguments to different restrict-qualified parameters [restrict]",[1356,2739,2713],{},[1345,2741,2742,2746,2752],{},[1356,2743,2744],{},[57,2745,2659],{"href":2658},[1356,2747,2748,2749],{},"Rule 8.14 (required) ",[2750,2751,228],"sup",{},[1356,2753,2713],{},[2755,2756,2757],"ol",{},[2758,2759,2760],"li",{},"MISRA Rule 8.14 prohibits the use of the restrict keyword except in C standard library functions.",[481,2762,2764],{"id":2763},"bibliography","Bibliography",[1339,2766,2768],{"className":2767},[2297],[1351,2769,2770,2784],{},[1345,2771,2773,2779],{"className":2772},[2327],[1356,2774,2775,2776,2778],{},"[ ",[57,2777,71],{"href":70}," ]",[1356,2780,2781,2782,1848],{},"6.7.4.2, \"Formal Definition of ",[43,2783,2663],{},[1345,2785,2787,2791],{"className":2786},[2353],[1356,2788,2775,2789,2778],{},[57,2790,60],{"href":59},[1356,2792,2793],{},[2424,2794],{},[2796,2797],"hr",{},[39,2799,2800,2807,2808,2807,2814],{},[57,2801,2803],{"href":2802},"\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp42-c",[2804,2805],"img",{"src":2806},"\u002Fattachments\u002F87152044\u002F88034188.png"," ",[57,2809,2811],{"href":2810},"\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002F",[2804,2812],{"src":2813},"\u002Fattachments\u002F87152044\u002F88034190.png",[57,2815,2817],{"href":2816},"\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp44-c",[2804,2818],{"src":2819},"\u002Fattachments\u002F87152044\u002F88034189.png",[2821,2822,2823],"style",{},"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 .sC2Qs, html code.shiki .sC2Qs{--shiki-default:#D73A49;--shiki-dark:#F97583;--shiki-sepia:#F92672}html pre.shiki code .sMOD_, html code.shiki .sMOD_{--shiki-default:#24292E;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .srTi1, html code.shiki .srTi1{--shiki-default:#6F42C1;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E}html pre.shiki code .sOrwc, html code.shiki .sOrwc{--shiki-default:#E36209;--shiki-dark:#FFAB70;--shiki-sepia:#F8F8F2}html pre.shiki code .s7F3e, html code.shiki .s7F3e{--shiki-default:#005CC5;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html pre.shiki code .s8-w5, html code.shiki .s8-w5{--shiki-default:#6A737D;--shiki-dark:#6A737D;--shiki-sepia:#88846F}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 .sstjo, html code.shiki .sstjo{--shiki-default:#032F62;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74}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}",{"title":115,"searchDepth":137,"depth":137,"links":2825},[2826,2827,2828,2835,2840,2845,2849,2853,2854],{"id":97,"depth":147,"text":98},{"id":326,"depth":147,"text":327},{"id":483,"depth":137,"text":2829,"children":2830},"restrict -Qualified Function Parameters",[2831,2832,2833,2834],{"id":501,"depth":147,"text":98},{"id":742,"depth":147,"text":327},{"id":910,"depth":147,"text":98},{"id":1132,"depth":147,"text":327},{"id":1321,"depth":137,"text":2836,"children":2837},"Invoking Library Functions with restrict -Qualified Pointers",[2838,2839],{"id":1412,"depth":147,"text":98},{"id":1546,"depth":147,"text":327},{"id":1687,"depth":137,"text":2841,"children":2842},"Calling Functions with restrict -Qualified Pointer to a const -Qualified Type",[2843,2844],{"id":1765,"depth":147,"text":98},{"id":1905,"depth":147,"text":327},{"id":1995,"depth":137,"text":1996,"children":2846},[2847,2848],{"id":2005,"depth":147,"text":98},{"id":2102,"depth":147,"text":327},{"id":2196,"depth":137,"text":2197,"children":2850},[2851,2852],{"id":2275,"depth":147,"text":2276},{"id":2292,"depth":147,"text":2293},{"id":2666,"depth":137,"text":2667},{"id":2763,"depth":137,"text":2764},"An object that is accessed through a restrict -qualified pointer has a special association with that pointer. This association requires that all accesses to that object use, directly or indirectly, the value of that particular pointer. The intended use of the restrict qualifier is to promote optimization, and deleting all instances of the qualifier from a program does not change its meaning (that is, observable behavior). In the absence of this qualifier, other pointers can alias this object. Caching the value in an object designated through a restrict -qualified pointer is safe at the beginning of the block in which the pointer is declared because no preexisting aliases may also be used to reference that object. The cached value must be restored to the object by the end of the block, where preexisting aliases again become available. New aliases may be formed within the block, but these must all depend on the value of the restrict -qualified pointer so that they can be identified and adjusted to refer to the cached value. For a restrict -qualified pointer at file scope, the block is the body of each function in the file [ Walls 2006 ]. Developers should be aware that C++ does not support the restrict qualifier, but some C++ compiler implementations support an equivalent qualifier as an extension.","md",{"tags":2858},[2859,2860,2861,2862,2863,2864],"nptc-aliasing","nptc","exp","not-for-cpp","rule","android-applicable","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp43-c",{"title":30,"description":2855},"4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F12.exp43-c","c3WKDrn9ISahQAShtjJbc4yvPj-iMUc2KC1nfN-3xTI",[2870,2873],{"title":2871,"path":2802,"stem":2872,"children":-1},"EXP42-C. Do not compare padding data","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F11.exp42-c",{"title":2874,"path":2816,"stem":2875,"children":-1},"EXP44-C. Do not rely on side effects in operands to sizeof, _Alignof, or _Generic","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F13.exp44-c",[2877],{"title":2878,"path":2879,"stem":2880,"children":2881},"SEI CERT C Coding Standard","\u002Fsei-cert-c-coding-standard","4.sei-cert-c-coding-standard\u002F01.index",[2882,2883,2955,3534,3807,3821,3825,3829,3833,4648],{"title":2878,"path":2879,"stem":2880},{"title":2884,"path":2885,"stem":2886,"children":2887},"Front Matter","\u002Fsei-cert-c-coding-standard\u002Ffront-matter","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F1.index",[2888,2889],{"title":2884,"path":2885,"stem":2886},{"title":2890,"path":2891,"stem":2892,"children":2893},"Introduction","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F01.index",[2894,2895,2899,2903,2907,2911,2915,2919,2923,2927,2931,2935,2939,2943,2947,2951],{"title":2890,"path":2891,"stem":2892},{"title":2896,"path":2897,"stem":2898},"Scope","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fscope","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F01.scope",{"title":2900,"path":2901,"stem":2902},"Audience","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Faudience","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F02.audience",{"title":2904,"path":2905,"stem":2906},"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":2908,"path":2909,"stem":2910},"History","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fhistory","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F04.history",{"title":2912,"path":2913,"stem":2914},"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":2916,"path":2917,"stem":2918},"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":2920,"path":2921,"stem":2922},"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":2924,"path":2925,"stem":2926},"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":2928,"path":2929,"stem":2930},"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":2932,"path":2933,"stem":2934},"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":2936,"path":2937,"stem":2938},"Usage","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fusage","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F11.usage",{"title":2940,"path":2941,"stem":2942},"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":2944,"path":2945,"stem":2946},"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":2948,"path":2949,"stem":2950},"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":2952,"path":2953,"stem":2954},"Acknowledgments","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Facknowledgments","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F15.acknowledgments",{"title":2956,"path":2957,"stem":2958,"children":2959},"Rules","\u002Fsei-cert-c-coding-standard\u002Frules","4.sei-cert-c-coding-standard\u002F03.rules\u002F01.index",[2960,2961,2965,2995,3025,3087,3125,3151,3173,3230,3256,3312,3346,3376,3386,3424,3494,3512],{"title":2956,"path":2957,"stem":2958},{"title":2962,"path":2963,"stem":2964},"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":2966,"path":2967,"stem":2968,"children":2969},"Arrays (ARR)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Farrays-arr","4.sei-cert-c-coding-standard\u002F03.rules\u002F03.arrays-arr\u002F1.index",[2970,2971,2975,2979,2983,2987,2991],{"title":2966,"path":2967,"stem":2968},{"title":2972,"path":2973,"stem":2974},"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":2976,"path":2977,"stem":2978},"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":2980,"path":2981,"stem":2982},"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":2984,"path":2985,"stem":2986},"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":2988,"path":2989,"stem":2990},"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":2992,"path":2993,"stem":2994},"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":2996,"path":2997,"stem":2998,"children":2999},"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",[3000,3001,3005,3009,3013,3017,3021],{"title":2996,"path":2997,"stem":2998},{"title":3002,"path":3003,"stem":3004},"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":3006,"path":3007,"stem":3008},"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":3010,"path":3011,"stem":3012},"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":3014,"path":3015,"stem":3016},"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":3018,"path":3019,"stem":3020},"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":3022,"path":3023,"stem":3024},"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":3026,"path":3027,"stem":3028,"children":3029},"Concurrency (CON)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F01.index",[3030,3031,3035,3039,3043,3047,3051,3055,3059,3063,3067,3071,3075,3079,3083],{"title":3026,"path":3027,"stem":3028},{"title":3032,"path":3033,"stem":3034},"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":3036,"path":3037,"stem":3038},"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":3040,"path":3041,"stem":3042},"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":3044,"path":3045,"stem":3046},"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":3048,"path":3049,"stem":3050},"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":3052,"path":3053,"stem":3054},"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":3056,"path":3057,"stem":3058},"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":3060,"path":3061,"stem":3062},"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":3064,"path":3065,"stem":3066},"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":3068,"path":3069,"stem":3070},"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":3072,"path":3073,"stem":3074},"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":3076,"path":3077,"stem":3078},"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":3080,"path":3081,"stem":3082},"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":3084,"path":3085,"stem":3086},"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":3088,"path":3089,"stem":3090,"children":3091},"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",[3092,3093,3097,3101,3105,3109,3113,3117,3121],{"title":3088,"path":3089,"stem":3090},{"title":3094,"path":3095,"stem":3096},"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":3098,"path":3099,"stem":3100},"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":3102,"path":3103,"stem":3104},"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":3106,"path":3107,"stem":3108},"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":3110,"path":3111,"stem":3112},"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":3114,"path":3115,"stem":3116},"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":3118,"path":3119,"stem":3120},"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":3122,"path":3123,"stem":3124},"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":3126,"path":3127,"stem":3128,"children":3129},"Environment (ENV)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fenvironment-env","4.sei-cert-c-coding-standard\u002F03.rules\u002F07.environment-env\u002F1.index",[3130,3131,3135,3139,3143,3147],{"title":3126,"path":3127,"stem":3128},{"title":3132,"path":3133,"stem":3134},"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":3136,"path":3137,"stem":3138},"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":3140,"path":3141,"stem":3142},"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":3144,"path":3145,"stem":3146},"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":3148,"path":3149,"stem":3150},"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":3152,"path":3153,"stem":3154,"children":3155},"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",[3156,3157,3161,3165,3169],{"title":3152,"path":3153,"stem":3154},{"title":3158,"path":3159,"stem":3160},"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":3162,"path":3163,"stem":3164},"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":3166,"path":3167,"stem":3168},"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":3170,"path":3171,"stem":3172},"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":3174,"path":3175,"stem":3176,"children":3177},"Expressions (EXP)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F01.index",[3178,3179,3183,3187,3191,3195,3199,3203,3207,3211,3215,3216,3217,3218,3222,3226],{"title":3174,"path":3175,"stem":3176},{"title":3180,"path":3181,"stem":3182},"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":3184,"path":3185,"stem":3186},"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":3188,"path":3189,"stem":3190},"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":3192,"path":3193,"stem":3194},"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":3196,"path":3197,"stem":3198},"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":3200,"path":3201,"stem":3202},"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":3204,"path":3205,"stem":3206},"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":3208,"path":3209,"stem":3210},"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":3212,"path":3213,"stem":3214},"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":2871,"path":2802,"stem":2872},{"title":30,"path":2865,"stem":2867},{"title":2874,"path":2816,"stem":2875},{"title":3219,"path":3220,"stem":3221},"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":3223,"path":3224,"stem":3225},"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":3227,"path":3228,"stem":3229},"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":3231,"path":3232,"stem":3233,"children":3234},"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",[3235,3236,3240,3244,3248,3252],{"title":3231,"path":3232,"stem":3233},{"title":3237,"path":3238,"stem":3239},"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":3241,"path":3242,"stem":3243},"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":3245,"path":3246,"stem":3247},"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":3249,"path":3250,"stem":3251},"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":3253,"path":3254,"stem":3255},"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":3257,"path":3258,"stem":3259,"children":3260},"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",[3261,3262,3264,3268,3272,3276,3280,3284,3288,3292,3296,3300,3304,3308],{"title":3257,"path":3258,"stem":3259},{"title":1761,"path":1760,"stem":3263},"4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F02.fio30-c",{"title":3265,"path":3266,"stem":3267},"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":3269,"path":3270,"stem":3271},"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":3273,"path":3274,"stem":3275},"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":3277,"path":3278,"stem":3279},"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":3281,"path":3282,"stem":3283},"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":3285,"path":3286,"stem":3287},"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":3289,"path":3290,"stem":3291},"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":3293,"path":3294,"stem":3295},"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":3297,"path":3298,"stem":3299},"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":3301,"path":3302,"stem":3303},"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":3305,"path":3306,"stem":3307},"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":3309,"path":3310,"stem":3311},"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":3313,"path":3314,"stem":3315,"children":3316},"Integers (INT)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F1.index",[3317,3318,3322,3326,3330,3334,3338,3342],{"title":3313,"path":3314,"stem":3315},{"title":3319,"path":3320,"stem":3321},"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":3323,"path":3324,"stem":3325},"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":3327,"path":3328,"stem":3329},"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":3331,"path":3332,"stem":3333},"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":3335,"path":3336,"stem":3337},"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":3339,"path":3340,"stem":3341},"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":3343,"path":3344,"stem":3345},"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":3347,"path":3348,"stem":3349,"children":3350},"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",[3351,3352,3356,3360,3364,3368,3372],{"title":3347,"path":3348,"stem":3349},{"title":3353,"path":3354,"stem":3355},"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":3357,"path":3358,"stem":3359},"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":3361,"path":3362,"stem":3363},"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":3365,"path":3366,"stem":3367},"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":3369,"path":3370,"stem":3371},"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":3373,"path":3374,"stem":3375},"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":3377,"path":3378,"stem":3379,"children":3380},"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",[3381,3382],{"title":3377,"path":3378,"stem":3379},{"title":3383,"path":3384,"stem":3385},"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":3387,"path":3388,"stem":3389,"children":3390},"Miscellaneous (MSC)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F1.index",[3391,3392,3396,3400,3404,3408,3412,3416,3420],{"title":3387,"path":3388,"stem":3389},{"title":3393,"path":3394,"stem":3395},"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":3397,"path":3398,"stem":3399},"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":3401,"path":3402,"stem":3403},"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":3405,"path":3406,"stem":3407},"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":3409,"path":3410,"stem":3411},"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":3413,"path":3414,"stem":3415},"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":3417,"path":3418,"stem":3419},"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":3421,"path":3422,"stem":3423},"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":3425,"path":3426,"stem":3427,"children":3428},"POSIX (POS)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F01.index",[3429,3430,3434,3438,3442,3446,3450,3454,3458,3462,3466,3470,3474,3478,3482,3486,3490],{"title":3425,"path":3426,"stem":3427},{"title":3431,"path":3432,"stem":3433},"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":3435,"path":3436,"stem":3437},"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":3439,"path":3440,"stem":3441},"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":3443,"path":3444,"stem":3445},"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":3447,"path":3448,"stem":3449},"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":3451,"path":3452,"stem":3453},"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":3455,"path":3456,"stem":3457},"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":3459,"path":3460,"stem":3461},"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":3463,"path":3464,"stem":3465},"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":3467,"path":3468,"stem":3469},"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":3471,"path":3472,"stem":3473},"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":3475,"path":3476,"stem":3477},"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":3479,"path":3480,"stem":3481},"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":3483,"path":3484,"stem":3485},"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":3487,"path":3488,"stem":3489},"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":3491,"path":3492,"stem":3493},"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":3495,"path":3496,"stem":3497,"children":3498},"Preprocessor (PRE)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fpreprocessor-pre","4.sei-cert-c-coding-standard\u002F03.rules\u002F17.preprocessor-pre\u002F1.index",[3499,3500,3504,3508],{"title":3495,"path":3496,"stem":3497},{"title":3501,"path":3502,"stem":3503},"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":3505,"path":3506,"stem":3507},"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":3509,"path":3510,"stem":3511},"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":3513,"path":3514,"stem":3515,"children":3516},"Signals (SIG)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fsignals-sig","4.sei-cert-c-coding-standard\u002F03.rules\u002F18.signals-sig\u002F1.index",[3517,3518,3522,3526,3530],{"title":3513,"path":3514,"stem":3515},{"title":3519,"path":3520,"stem":3521},"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":3523,"path":3524,"stem":3525},"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":3527,"path":3528,"stem":3529},"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":3531,"path":3532,"stem":3533},"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":3535,"path":3536,"stem":3537,"children":3538},"Back Matter","\u002Fsei-cert-c-coding-standard\u002Fback-matter","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F1.index",[3539,3540,3543,3547,3551,3555,3746,3803],{"title":3535,"path":3536,"stem":3537},{"title":3541,"path":59,"stem":3542},"AA. Bibliography","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F2.aa-bibliography",{"title":3544,"path":3545,"stem":3546},"BB. Definitions","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fbb-definitions","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F3.bb-definitions",{"title":3548,"path":3549,"stem":3550},"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":3552,"path":3553,"stem":3554},"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":3556,"path":3557,"stem":3558,"children":3559},"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",[3560,3561,3563,3567,3571,3575,3579,3583,3587,3591,3595,3599,3603,3605,3609,3611,3615,3619,3621,3625,3629,3633,3637,3641,3645,3648,3652,3654,3658,3660,3664,3667,3671,3674,3678,3680,3684,3686,3690,3694,3698,3702,3706,3710,3712,3716,3720,3724,3726,3730,3734,3738,3742],{"title":3556,"path":3557,"stem":3558},{"title":2333,"path":2332,"stem":3562},"4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F02.astree",{"title":3564,"path":3565,"stem":3566},"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":3568,"path":3569,"stem":3570},"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":3572,"path":3573,"stem":3574},"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":3576,"path":3577,"stem":3578},"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":3580,"path":3581,"stem":3582},"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":3584,"path":3585,"stem":3586},"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":3588,"path":3589,"stem":3590},"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":3592,"path":3593,"stem":3594},"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":3596,"path":3597,"stem":3598},"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":3600,"path":3601,"stem":3602},"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":2359,"path":2358,"stem":3604},"4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F13.codesonar",{"title":3606,"path":3607,"stem":3608},"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":2382,"path":2381,"stem":3610},"4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F15.coverity",{"title":3612,"path":3613,"stem":3614},"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":3616,"path":3617,"stem":3618},"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":2407,"path":2406,"stem":3620},"4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F18.cppcheck-premium",{"title":3622,"path":3623,"stem":3624},"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":3626,"path":3627,"stem":3628},"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":3630,"path":3631,"stem":3632},"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":3634,"path":3635,"stem":3636},"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":3638,"path":3639,"stem":3640},"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":3642,"path":3643,"stem":3644},"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":2434,"path":3646,"stem":3647},"\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":3649,"path":3650,"stem":3651},"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":2457,"path":2456,"stem":3653},"4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F27.helix-qac",{"title":3655,"path":3656,"stem":3657},"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":2483,"path":2482,"stem":3659},"4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F29.klocwork",{"title":3661,"path":3662,"stem":3663},"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":3665,"path":2507,"stem":3666},"LDRA","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F31.ldra",{"title":3668,"path":3669,"stem":3670},"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":3672,"path":2532,"stem":3673},"Parasoft","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F33.parasoft",{"title":3675,"path":3676,"stem":3677},"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":2557,"path":2556,"stem":3679},"4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F35.pc-lint-plus",{"title":3681,"path":3682,"stem":3683},"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":2586,"path":2585,"stem":3685},"4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F37.polyspace-bug-finder",{"title":3687,"path":3688,"stem":3689},"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":3691,"path":3692,"stem":3693},"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":3695,"path":3696,"stem":3697},"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":3699,"path":3700,"stem":3701},"Rose","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Frose","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F41.rose",{"title":3703,"path":3704,"stem":3705},"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":3707,"path":3708,"stem":3709},"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":2616,"path":2615,"stem":3711},"4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F44.rulechecker",{"title":3713,"path":3714,"stem":3715},"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":3717,"path":3718,"stem":3719},"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":3721,"path":3722,"stem":3723},"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":2638,"path":2637,"stem":3725},"4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F48.sonarqube-ccpp-plugin",{"title":3727,"path":3728,"stem":3729},"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":3731,"path":3732,"stem":3733},"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":3735,"path":3736,"stem":3737},"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":3739,"path":3740,"stem":3741},"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":3743,"path":3744,"stem":3745},"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":3747,"path":3748,"stem":3749,"children":3750},"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",[3751,3752,3756,3760,3764,3768,3772,3776,3780,3784,3787,3791,3795,3799],{"title":3747,"path":3748,"stem":3749},{"title":3753,"path":3754,"stem":3755},"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":3757,"path":3758,"stem":3759},"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":3761,"path":3762,"stem":3763},"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":3765,"path":3766,"stem":3767},"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":3769,"path":3770,"stem":3771},"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":3773,"path":3774,"stem":3775},"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":3777,"path":3778,"stem":3779},"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":3781,"path":3782,"stem":3783},"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":3781,"path":3785,"stem":3786},"\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":3788,"path":3789,"stem":3790},"MITRE CWE","\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":3792,"path":3793,"stem":3794},"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":3796,"path":3797,"stem":3798},"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":3800,"path":3801,"stem":3802},"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":3804,"path":3805,"stem":3806},"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":3808,"path":3809,"stem":3810,"children":3811},"Admin","\u002Fsei-cert-c-coding-standard\u002Fadmin","4.sei-cert-c-coding-standard\u002F05.admin\u002F1.index",[3812,3813,3817],{"title":3808,"path":3809,"stem":3810},{"title":3814,"path":3815,"stem":3816},"TODO List","\u002Fsei-cert-c-coding-standard\u002Fadmin\u002Ftodo-list","4.sei-cert-c-coding-standard\u002F05.admin\u002F2.todo-list",{"title":3818,"path":3819,"stem":3820},"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":3822,"path":3823,"stem":3824},"Coding Style Guidelines","\u002Fsei-cert-c-coding-standard\u002Fcoding-style-guidelines","4.sei-cert-c-coding-standard\u002F05.coding-style-guidelines",{"title":3826,"path":3827,"stem":3828},"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":3830,"path":3831,"stem":3832},"Wiki Contents","\u002Fsei-cert-c-coding-standard\u002Fwiki-contents","4.sei-cert-c-coding-standard\u002F06.wiki-contents",{"title":3834,"path":3835,"stem":3836,"children":3837},"Recommendations","\u002Fsei-cert-c-coding-standard\u002Frecommendations","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F01.index",[3838,3839,3880,3897,3942,3983,4080,4097,4130,4199,4236,4321,4386,4435,4460,4553,4574,4631],{"title":3834,"path":3835,"stem":3836},{"title":2962,"path":3840,"stem":3841,"children":3842},"\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",[3843,3844,3848,3852,3856,3860,3864,3868,3872,3876],{"title":2962,"path":3840,"stem":3841},{"title":3845,"path":3846,"stem":3847},"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":3849,"path":3850,"stem":3851},"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":3853,"path":3854,"stem":3855},"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":3857,"path":3858,"stem":3859},"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":3861,"path":3862,"stem":3863},"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":3865,"path":3866,"stem":3867},"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":3869,"path":3870,"stem":3871},"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":3873,"path":3874,"stem":3875},"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":3877,"path":3878,"stem":3879},"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":2966,"path":3881,"stem":3882,"children":3883},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Farrays-arr","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F03.arrays-arr\u002F1.index",[3884,3885,3889,3893],{"title":2966,"path":3881,"stem":3882},{"title":3886,"path":3887,"stem":3888},"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":3890,"path":3891,"stem":3892},"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":3894,"path":3895,"stem":3896},"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":2996,"path":3898,"stem":3899,"children":3900},"\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",[3901,3902,3906,3910,3914,3918,3922,3926,3930,3934,3938],{"title":2996,"path":3898,"stem":3899},{"title":3903,"path":3904,"stem":3905},"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":3907,"path":3908,"stem":3909},"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":3911,"path":3912,"stem":3913},"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":3915,"path":3916,"stem":3917},"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":3919,"path":3920,"stem":3921},"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":3923,"path":3924,"stem":3925},"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":3927,"path":3928,"stem":3929},"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":3931,"path":3932,"stem":3933},"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":3935,"path":3936,"stem":3937},"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":3939,"path":3940,"stem":3941},"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":3026,"path":3943,"stem":3944,"children":3945},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F01.index",[3946,3947,3951,3955,3959,3963,3967,3971,3975,3979],{"title":3026,"path":3943,"stem":3944},{"title":3948,"path":3949,"stem":3950},"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":3952,"path":3953,"stem":3954},"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":3956,"path":3957,"stem":3958},"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":3960,"path":3961,"stem":3962},"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":3964,"path":3965,"stem":3966},"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":3968,"path":3969,"stem":3970},"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":3972,"path":3973,"stem":3974},"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":3976,"path":3977,"stem":3978},"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":3980,"path":3981,"stem":3982},"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":3088,"path":3984,"stem":3985,"children":3986},"\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",[3987,3988,3992,3996,4000,4004,4008,4012,4016,4020,4024,4028,4032,4036,4040,4044,4048,4052,4056,4060,4064,4068,4072,4076],{"title":3088,"path":3984,"stem":3985},{"title":3989,"path":3990,"stem":3991},"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":3993,"path":3994,"stem":3995},"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":3997,"path":3998,"stem":3999},"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":4001,"path":4002,"stem":4003},"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":4005,"path":4006,"stem":4007},"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":4009,"path":4010,"stem":4011},"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":4013,"path":4014,"stem":4015},"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":4017,"path":4018,"stem":4019},"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":4021,"path":4022,"stem":4023},"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":4025,"path":4026,"stem":4027},"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":4029,"path":4030,"stem":4031},"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":4033,"path":4034,"stem":4035},"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":4037,"path":4038,"stem":4039},"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":4041,"path":4042,"stem":4043},"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":4045,"path":4046,"stem":4047},"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":4049,"path":4050,"stem":4051},"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":4053,"path":4054,"stem":4055},"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":4057,"path":4058,"stem":4059},"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":4061,"path":4062,"stem":4063},"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":4065,"path":4066,"stem":4067},"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":4069,"path":4070,"stem":4071},"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":4073,"path":4074,"stem":4075},"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":4077,"path":4078,"stem":4079},"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":3126,"path":4081,"stem":4082,"children":4083},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fenvironment-env","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F07.environment-env\u002F1.index",[4084,4085,4089,4093],{"title":3126,"path":4081,"stem":4082},{"title":4086,"path":4087,"stem":4088},"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":4090,"path":4091,"stem":4092},"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":4094,"path":4095,"stem":4096},"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":3152,"path":4098,"stem":4099,"children":4100},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F1.index",[4101,4102,4106,4110,4114,4118,4122,4126],{"title":3152,"path":4098,"stem":4099},{"title":4103,"path":4104,"stem":4105},"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":4107,"path":4108,"stem":4109},"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":4111,"path":4112,"stem":4113},"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":4115,"path":4116,"stem":4117},"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":4119,"path":4120,"stem":4121},"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":4123,"path":4124,"stem":4125},"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":4127,"path":4128,"stem":4129},"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":3174,"path":4131,"stem":4132,"children":4133},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F01.index",[4134,4135,4139,4143,4147,4151,4155,4159,4163,4167,4171,4175,4179,4183,4187,4191,4195],{"title":3174,"path":4131,"stem":4132},{"title":4136,"path":4137,"stem":4138},"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":4140,"path":4141,"stem":4142},"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":4144,"path":4145,"stem":4146},"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":4148,"path":4149,"stem":4150},"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":4152,"path":4153,"stem":4154},"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":4156,"path":4157,"stem":4158},"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":4160,"path":4161,"stem":4162},"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":4164,"path":4165,"stem":4166},"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":4168,"path":4169,"stem":4170},"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":4172,"path":4173,"stem":4174},"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":4176,"path":4177,"stem":4178},"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":4180,"path":4181,"stem":4182},"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":4184,"path":4185,"stem":4186},"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":4188,"path":4189,"stem":4190},"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":4192,"path":4193,"stem":4194},"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":4196,"path":4197,"stem":4198},"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":3231,"path":4200,"stem":4201,"children":4202},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F1.index",[4203,4204,4208,4212,4216,4220,4224,4228,4232],{"title":3231,"path":4200,"stem":4201},{"title":4205,"path":4206,"stem":4207},"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":4209,"path":4210,"stem":4211},"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":4213,"path":4214,"stem":4215},"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":4217,"path":4218,"stem":4219},"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":4221,"path":4222,"stem":4223},"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":4225,"path":4226,"stem":4227},"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":4229,"path":4230,"stem":4231},"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":4233,"path":4234,"stem":4235},"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":3257,"path":4237,"stem":4238,"children":4239},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F01.index",[4240,4241,4245,4249,4253,4257,4261,4265,4269,4273,4277,4281,4285,4289,4293,4297,4301,4305,4309,4313,4317],{"title":3257,"path":4237,"stem":4238},{"title":4242,"path":4243,"stem":4244},"FIO01-C. Be careful using functions that use file names for identification","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F02.fio01-c",{"title":4246,"path":4247,"stem":4248},"FIO02-C. Canonicalize path names originating from tainted sources","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F03.fio02-c",{"title":4250,"path":4251,"stem":4252},"FIO03-C. Do not make assumptions about fopen() and file creation","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F04.fio03-c",{"title":4254,"path":4255,"stem":4256},"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":4258,"path":4259,"stem":4260},"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":4262,"path":4263,"stem":4264},"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":4266,"path":4267,"stem":4268},"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":4270,"path":4271,"stem":4272},"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":4274,"path":4275,"stem":4276},"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":4278,"path":4279,"stem":4280},"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":4282,"path":4283,"stem":4284},"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":4286,"path":4287,"stem":4288},"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":4290,"path":4291,"stem":4292},"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":4294,"path":4295,"stem":4296},"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":4298,"path":4299,"stem":4300},"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":4302,"path":4303,"stem":4304},"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":4306,"path":4307,"stem":4308},"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":4310,"path":4311,"stem":4312},"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":4314,"path":4315,"stem":4316},"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":4318,"path":4319,"stem":4320},"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":3313,"path":4322,"stem":4323,"children":4324},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F01.index",[4325,4326,4330,4334,4338,4342,4346,4350,4354,4358,4362,4366,4370,4374,4378,4382],{"title":3313,"path":4322,"stem":4323},{"title":4327,"path":4328,"stem":4329},"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":4331,"path":4332,"stem":4333},"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":4335,"path":4336,"stem":4337},"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":4339,"path":4340,"stem":4341},"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":4343,"path":4344,"stem":4345},"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":4347,"path":4348,"stem":4349},"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":4351,"path":4352,"stem":4353},"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":4355,"path":4356,"stem":4357},"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":4359,"path":4360,"stem":4361},"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":4363,"path":4364,"stem":4365},"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":4367,"path":4368,"stem":4369},"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":4371,"path":4372,"stem":4373},"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":4375,"path":4376,"stem":4377},"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":4379,"path":4380,"stem":4381},"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":4383,"path":4384,"stem":4385},"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":3347,"path":4387,"stem":4388,"children":4389},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F01.index",[4390,4391,4395,4399,4403,4407,4411,4415,4419,4423,4427,4431],{"title":3347,"path":4387,"stem":4388},{"title":4392,"path":4393,"stem":4394},"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":4396,"path":4397,"stem":4398},"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":4400,"path":4401,"stem":4402},"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":4404,"path":4405,"stem":4406},"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":4408,"path":4409,"stem":4410},"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":4412,"path":4413,"stem":4414},"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":4416,"path":4417,"stem":4418},"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":4420,"path":4421,"stem":4422},"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":4424,"path":4425,"stem":4426},"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":4428,"path":4429,"stem":4430},"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":4432,"path":4433,"stem":4434},"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":3377,"path":4436,"stem":4437,"children":4438},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmicrosoft-windows-win","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F14.microsoft-windows-win\u002F1.index",[4439,4440,4444,4448,4452,4456],{"title":3377,"path":4436,"stem":4437},{"title":4441,"path":4442,"stem":4443},"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":4445,"path":4446,"stem":4447},"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":4449,"path":4450,"stem":4451},"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":4453,"path":4454,"stem":4455},"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":4457,"path":4458,"stem":4459},"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":3387,"path":4461,"stem":4462,"children":4463},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F01.index",[4464,4465,4469,4473,4477,4481,4485,4489,4493,4497,4501,4505,4509,4513,4517,4521,4525,4529,4533,4537,4541,4545,4549],{"title":3387,"path":4461,"stem":4462},{"title":4466,"path":4467,"stem":4468},"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":4470,"path":4471,"stem":4472},"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":4474,"path":4475,"stem":4476},"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":4478,"path":4479,"stem":4480},"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":4482,"path":4483,"stem":4484},"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":4486,"path":4487,"stem":4488},"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":4490,"path":4491,"stem":4492},"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":4494,"path":4495,"stem":4496},"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":4498,"path":4499,"stem":4500},"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":4502,"path":4503,"stem":4504},"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":4506,"path":4507,"stem":4508},"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":4510,"path":4511,"stem":4512},"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":4514,"path":4515,"stem":4516},"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":4518,"path":4519,"stem":4520},"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":4522,"path":4523,"stem":4524},"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":4526,"path":4527,"stem":4528},"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":4530,"path":4531,"stem":4532},"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":4534,"path":4535,"stem":4536},"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":4538,"path":4539,"stem":4540},"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":4542,"path":4543,"stem":4544},"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":4546,"path":4547,"stem":4548},"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":4550,"path":4551,"stem":4552},"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":3425,"path":4554,"stem":4555,"children":4556},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fposix-pos","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F16.posix-pos\u002F1.index",[4557,4558,4562,4566,4570],{"title":3425,"path":4554,"stem":4555},{"title":4559,"path":4560,"stem":4561},"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":4563,"path":4564,"stem":4565},"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":4567,"path":4568,"stem":4569},"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":4571,"path":4572,"stem":4573},"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":3495,"path":4575,"stem":4576,"children":4577},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F01.index",[4578,4579,4583,4587,4591,4595,4599,4603,4607,4611,4615,4619,4623,4627],{"title":3495,"path":4575,"stem":4576},{"title":4580,"path":4581,"stem":4582},"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":4584,"path":4585,"stem":4586},"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":4588,"path":4589,"stem":4590},"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":4592,"path":4593,"stem":4594},"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":4596,"path":4597,"stem":4598},"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":4600,"path":4601,"stem":4602},"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":4604,"path":4605,"stem":4606},"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":4608,"path":4609,"stem":4610},"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":4612,"path":4613,"stem":4614},"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":4616,"path":4617,"stem":4618},"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":4620,"path":4621,"stem":4622},"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":4624,"path":4625,"stem":4626},"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":4628,"path":4629,"stem":4630},"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":3513,"path":4632,"stem":4633,"children":4634},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fsignals-sig","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F18.signals-sig\u002F1.index",[4635,4636,4640,4644],{"title":3513,"path":4632,"stem":4633},{"title":4637,"path":4638,"stem":4639},"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":4641,"path":4642,"stem":4643},"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":4645,"path":4646,"stem":4647},"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":4649,"path":4650,"stem":4651},"CERT manifest files","\u002Fsei-cert-c-coding-standard\u002Fcert-manifest-files","4.sei-cert-c-coding-standard\u002F09.cert-manifest-files",1775657828862]