{"id":10875,"date":"2021-09-10T12:08:46","date_gmt":"2021-09-10T04:08:46","guid":{"rendered":"https:\/\/www.bookcard.net\/wordpress\/?p=10875"},"modified":"2021-09-10T12:09:19","modified_gmt":"2021-09-10T04:09:19","slug":"android_studio_ndk_fprintf_format","status":"publish","type":"post","link":"https:\/\/www.bookcard.net\/wordpress\/android_studio_ndk_fprintf_format\/","title":{"rendered":"Android Studio NDK-fprintf()\u683c\u5f0f\u5b57\u7b26"},"content":{"rendered":"<figure id=\"attachment_10877\" aria-describedby=\"caption-attachment-10877\" style=\"width: 1280px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2021\/09\/Android_Studio_NDK_fprintf_Format.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-10877\" src=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2021\/09\/Android_Studio_NDK_fprintf_Format.jpg\" alt=\"Android Studio NDK-fprintf()\u683c\u5f0f\u5b57\u7b26\" width=\"1280\" height=\"800\" srcset=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2021\/09\/Android_Studio_NDK_fprintf_Format.jpg 1280w, https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2021\/09\/Android_Studio_NDK_fprintf_Format-300x188.jpg 300w, https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2021\/09\/Android_Studio_NDK_fprintf_Format-768x480.jpg 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/a><figcaption id=\"caption-attachment-10877\" class=\"wp-caption-text\">Android Studio NDK-fprintf()\u683c\u5f0f\u5b57\u7b26<\/figcaption><\/figure>\n<p>\u4fc2NDK\u8abf\u7528fprintf ()\u683c\u5f0f\u5b57\u7b26\u51fd\u5f0f\u5831\u932f<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"575\">fprintf(fp_error,buffer);<\/td>\n<\/tr>\n<tr>\n<td width=\"575\">error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u539f\u89e3fprintf()\u7f3a\u5931\u53c3\u6578.\u52a0\u5165\u53c3\u65780\u554f\u984c\u6d88\u5931.<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"575\">fprintf(fp_error,buffer,0);<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"406\">int printf(const char *format [,argument]&#8230;);<\/td>\n<td width=\"169\">\u7192\u5c4f<\/td>\n<\/tr>\n<tr>\n<td width=\"406\">int fprintf(FILE *stream,const char *format [,argument ]&#8230;);<\/td>\n<td width=\"169\">\u6587\u6a94<\/td>\n<\/tr>\n<tr>\n<td width=\"406\">int sprintf(char *buffer,const char *format [,argument] &#8230;);<\/td>\n<td width=\"169\">\u8a18\u61b6\u9ad4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"104\">format\u683c\u5f0f<\/td>\n<td width=\"132\">argument\u53c3\u6578<\/td>\n<td width=\"339\">\u7c21\u4ecb<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">c<\/td>\n<td width=\"132\">\u5b57\u7b26<\/td>\n<td width=\"339\">\u55ae\u500b\u5b57\u7b26<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">C<\/td>\n<td width=\"132\">\u5b57\u7b26<\/td>\n<td width=\"339\">\u55ae\u500b\u5b57\u7b26<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">d<\/td>\n<td width=\"132\">\u6574\u6578<\/td>\n<td width=\"339\">\u5e36\u6b63\u8ca0\u7b26\u865f\u5341\u9032\u6574\u6578<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">i<\/td>\n<td width=\"132\">\u6574\u6578<\/td>\n<td width=\"339\">\u5e36\u6b63\u8ca0\u7b26\u865f\u5341\u9032\u6574\u6578<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">o<\/td>\n<td width=\"132\">\u6574\u6578<\/td>\n<td width=\"339\">\u5187\u6b63\u8ca0\u7b26\u865f\u516b\u9032\u6574\u6578<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">u<\/td>\n<td width=\"132\">\u6574\u6578<\/td>\n<td width=\"339\">\u5187\u6b63\u8ca0\u7b26\u865f\u5341\u9032\u6574\u6578<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">x<\/td>\n<td width=\"132\">\u6574\u6578<\/td>\n<td width=\"339\">\u5187\u6b63\u8ca0\u7b26\u865f,\u7d30\u5beb\u5341\u516d\u9032\u6574\u6578.abcdef<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">X<\/td>\n<td width=\"132\">\u6574\u6578<\/td>\n<td width=\"339\">\u5187\u6b63\u8ca0\u7b26\u865f,\u5927\u5beb\u5341\u516d\u9032\u6574\u6578.ABCDEF<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">e<\/td>\n<td width=\"132\">\u6d6e\u9ede\u6578<\/td>\n<td width=\"339\">\u5e36\u6b63\u8ca0\u7b26\u865f\u5341\u9032\u6d6e\u9ede\u6578,\u6307\u6578\u7248.<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">E<\/td>\n<td width=\"132\">\u6d6e\u9ede\u6578<\/td>\n<td width=\"339\">\u5e36\u6b63\u8ca0\u7b26\u865f\u5341\u9032\u6d6e\u9ede\u6578, \u6307\u6578\u7248.<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">f<\/td>\n<td width=\"132\">\u6d6e\u9ede\u6578<\/td>\n<td width=\"339\">\u5e36\u6b63\u8ca0\u7b26\u865f\u5341\u9032\u6d6e\u9ede\u6578<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">F<\/td>\n<td width=\"132\">\u6d6e\u9ede\u6578<\/td>\n<td width=\"339\">\u5e36\u6b63\u8ca0\u7b26\u865f\u5341\u9032\u6d6e\u9ede\u6578<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">g<\/td>\n<td width=\"132\">\u6d6e\u9ede\u6578<\/td>\n<td width=\"339\">\u4fc2%e\u540c%f\u4e2d\u9078<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">G<\/td>\n<td width=\"132\">\u6d6e\u9ede\u6578<\/td>\n<td width=\"339\">\u4fc2%e\u540c%f\u4e2d\u9078<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">a<\/td>\n<td width=\"132\"><\/td>\n<td width=\"339\"><\/td>\n<\/tr>\n<tr>\n<td width=\"104\">A<\/td>\n<td width=\"132\"><\/td>\n<td width=\"339\"><\/td>\n<\/tr>\n<tr>\n<td width=\"104\">n<\/td>\n<td width=\"132\"><\/td>\n<td width=\"339\"><\/td>\n<\/tr>\n<tr>\n<td width=\"104\">s<\/td>\n<td width=\"132\">\u5b57\u7b26\u4e32<\/td>\n<td width=\"339\">\u76f4\u81f3\u9996\u500bNULL<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">S<\/td>\n<td width=\"132\">\u5b57\u7b26\u4e32<\/td>\n<td width=\"339\">\u76f4\u81f3\u9996\u500bNULL<\/td>\n<\/tr>\n<tr>\n<td width=\"104\">z<\/td>\n<td width=\"132\"><\/td>\n<td width=\"339\"><\/td>\n<\/tr>\n<tr>\n<td width=\"104\">%<\/td>\n<td width=\"132\"><\/td>\n<td width=\"339\">\u6307\u5b9a\u683c\u5f0f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"288\">\u6a23\u5f0f<\/td>\n<td width=\"288\">\u8f38\u51fa\/\u5beb\u5165<\/td>\n<\/tr>\n<tr>\n<td width=\"288\">sprintf (text, &#8221; %2d\\n&#8221;,\u00a0 3);<\/td>\n<td width=\"288\">03<\/td>\n<\/tr>\n<tr>\n<td width=\"288\">sprintf (text, &#8220;%s\\n &#8220;, &#8220;abcdef&#8221;);<\/td>\n<td width=\"288\">abcdef<\/td>\n<\/tr>\n<tr>\n<td width=\"288\"><\/td>\n<td width=\"288\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4fc2NDK\u8abf\u7528fprintf ()\u683c\u5f0f\u5b57\u7b26\u51fd\u5f0f\u5831\u932f fprintf(fp_error,buffer); erro &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.bookcard.net\/wordpress\/android_studio_ndk_fprintf_format\/\" class=\"more-link\">\u7e7c\u7e8c\u95b1\u8b80 <span class=\"screen-reader-text\">Android Studio NDK-fprintf()\u683c\u5f0f\u5b57\u7b26<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,13],"tags":[2,40],"class_list":["post-10875","post","type-post","status-publish","format-standard","hentry","category-android","category-pc","tag-android","tag-history","entry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts\/10875","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/comments?post=10875"}],"version-history":[{"count":2,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts\/10875\/revisions"}],"predecessor-version":[{"id":10878,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts\/10875\/revisions\/10878"}],"wp:attachment":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/media?parent=10875"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/categories?post=10875"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/tags?post=10875"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}