{"id":2744,"date":"2026-11-10T08:04:01","date_gmt":"2026-11-10T08:04:01","guid":{"rendered":"https:\/\/wiki.designcorner.co.ke\/?dc_term=null-terminated-string"},"modified":"2026-11-10T08:04:01","modified_gmt":"2026-11-10T08:04:01","slug":"null-terminated-string","status":"publish","type":"dc_term","link":"https:\/\/wiki.designcorner.co.ke\/?dc_term=null-terminated-string","title":{"rendered":"Null-Terminated String"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What it is<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In languages such as C, text is stored as characters followed by a null value that signals the end. Forgetting the marker, or writing past it, causes bugs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why it matters for your business<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Mistakes in handling these strings have caused many security holes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Real-world example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A C program in a point-of-sale system crashes when a customer name is longer than expected.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Design Corner tip<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Prefer modern languages and libraries that handle strings safely, and test inputs with long values.<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>A way of storing text where a zero byte marks the end of the string.<\/p>\n","protected":false},"featured_media":0,"template":"","dc_letter":[19],"dc_topic":[34],"class_list":["post-2744","dc_term","type-dc_term","status-publish","hentry","dc_letter-n","dc_topic-software-and-development"],"_links":{"self":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term\/2744","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term"}],"about":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/types\/dc_term"}],"version-history":[{"count":0,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term\/2744\/revisions"}],"wp:attachment":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2744"}],"wp:term":[{"taxonomy":"dc_letter","embeddable":true,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fdc_letter&post=2744"},{"taxonomy":"dc_topic","embeddable":true,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fdc_topic&post=2744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}