{"id":76,"date":"2005-04-20T19:14:28","date_gmt":"2005-04-20T23:14:28","guid":{"rendered":"http:\/\/www.hoogervorst.ca\/~arthur\/wordpress\/?p=76"},"modified":"2005-05-02T15:48:31","modified_gmt":"2005-05-02T18:48:31","slug":"evil-that-strncpy-does","status":"publish","type":"post","link":"http:\/\/www.hoogervorst.ca\/arthur\/?p=76","title":{"rendered":"Evil that strncpy does"},"content":{"rendered":"<p><span class=\"dropcap\">W<\/span>hich <a href=\".\/wp-content\/whichcopyisevil.jpg\"><img src='.\/wp-content\/sm_whichcopyisevil.jpg' alt='Evil that men do' style=\"float:right;margin:5px\" \/><\/a> one is more evil? <a href=\"http:\/\/www.icewalkers.com\/Linux\/ManPages\/strcpy-3.html\">strcpy<\/a> or <a href=\"http:\/\/www.strncpy.org\">strncpy<\/a>?\n<\/p>\n<p>Google suggests &#8216;strcpy is evil&#8217; when looking for &#8216;strncpy is evil&#8217;. Or as the <a href=\"http:\/\/vision.eng.shu.ac.uk\/C++\/c++\/programming-howto\/C++Programming-HOWTO-1.html\">author of this page says<\/a>:\n<\/p>\n<p class=\"quote\">The usage of char * and strcpy causes horrible memory problems due to &#8220;overflow&#8221;, &#8220;fence past errors&#8221;, &#8220;step-on-others-toe&#8221; (hurting other variable&#8217;s memory locations) or &#8220;memory leaks&#8221;.\n<\/p>\n<p>Horrors.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Which one is more evil? strcpy or strncpy? Google suggests &#8216;strcpy is evil&#8217; when looking for &#8216;strncpy is evil&#8217;. Or as the author of this page says: The usage of char * and strcpy causes horrible memory problems due to &hellip; <a href=\"http:\/\/www.hoogervorst.ca\/arthur\/?p=76\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[],"_links":{"self":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/76"}],"collection":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=76"}],"version-history":[{"count":0,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/76\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=76"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=76"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=76"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}