PVS-Studioã䜿çšããŠglibcã©ã€ãã©ãªã確èªããå®éšãå®æœããŸããã å®éšã®ç®çã¯ãã¢ãã©ã€ã¶ãŒãLinuxãããžã§ã¯ããã©ã®çšåºŠæ£åžžã«ãã§ãã¯ã§ãããã確èªããããšã§ãã ãããŸã§ã®ãšããæªãããšãã§ããŸãã éæšæºã®æ¡åŒµæ©èœã䜿çšããŠãããããå€ãã®èª€æ€ç¥ããããŸãã ããããããã§ãé¢çœããã®ãèŠã€ããããšãã§ããŸããã
glibc
glibc -GNU Cã©ã€ãã©ãªïŒGNUã©ã€ãã©ãªïŒã Glibcã¯ãã·ã¹ãã ã³ãŒã«ãšãopenãmallocãprintfãªã©ã®åºæ¬æ©èœãæäŸããCã©ã€ãã©ãªã§ãã Cã©ã€ãã©ãªã¯ããã¹ãŠã®åçã«ãªã³ã¯ãããããã°ã©ã ã«äœ¿çšãããŸãã GNUãªãã¬ãŒãã£ã³ã°ã·ã¹ãã çšã®Free Software Foundationã«ãã£ãŠäœæãããŠããŸãã glibcã¯GNU LGPLã©ã€ã»ã³ã¹ã®äžã§ãªãªãŒã¹ãããŠããŸãã
ãŠã£ãããã£ã¢ããã®æ¹ç·šïŒ glibc ã
å°ãåã«ãæ°ããããŒãžã§ã³ã®glibcã©ã€ãã©ãªããªãªãŒã¹ããããšãããã¥ãŒã¹ãã€ã³ã¿ãŒãããã«ç»å ŽããŸããã ãã®ããã PVS-Studioã¢ãã©ã€ã¶ãŒã䜿çšããŠãã®ã©ã€ãã©ãªããã¹ãããå¿ èŠããããŸããã ã€ãŸããglibc-2-19-90ããŒãžã§ã³ããã§ãã¯ãããŸããã æ®å¿µãªãããæ°é±éã¯æ°ãæ£ããŸããã®ã§ãä»ã ãèšäºãæžãæéãèŠã€ããŸããã ç§ã¯ããã€ãã®éçã¢ãã©ã€ã¶ãŒã®å€§èŠæš¡ãªæ¯èŒã«å¿ããã£ãã ããã¯ãCppcheckãVisual Studio 2013ã®éçã¢ãã©ã€ã¶ãŒãããåªããŠãããã®ãå°ããããšãæ¢ããªããããç§ãã¡ã«ãšã£ãŠéåžžã«éèŠãªã¿ã¹ã¯ã§ãããããã£ãŠãglibcã¯å°ãåŸ ããªããã°ãªããŸããã§ããã
ã²ã©ããã®ãèŠã€ãããšã¯æã£ãŠããŸããã§ããããå®éã«ã¯èŠã€ãããŸããã§ããã glibcã©ã€ãã©ãªã¯éåžžã«é«å質ã§ãããå€ãã®ããŒãµãŒã«ãã£ãŠæ€èšŒãããŠããŸãã å°ãªããšãããããã¯æ¬¡ã®ãšããã§ãã
- ã³ããªãã£
- Clang;
- Cppcheckã
åæã®è€éãã¯äœã§ãã
éçåæããŒã«ã®å éšãããã³ã«æ £ããŠããªããããéåžžã«ã·ã³ãã«ãªãŠãŒãã£ãªãã£ã®ããã«èŠããŸãã ããã§ã¯ãããŸããã ãããã¯éåžžã«è€éãªããã°ã©ã ã§ãã
RATSãªã©ã®ããŒã«ã¯ãããã«ããå ŽåããããŸã ã 誰ããRATSã³ãŒããèŠããšãããã¯ãã¡ã€ã«å ã®ç¹å®ã®é¢æ°åã®åãªãæ€çŽ¢ã§ããããšãããããŸããã ãã®ããŒã«ã¯ãéçã³ãŒãã¢ãã©ã€ã¶ãŒãšãåŒã°ããŸãã ãã ããå®éã®ã³ãŒãã¢ãã©ã€ã¶ãŒãè¡ãããšãšã¯éåžžã«ç°ãªããŸãã éçåæã¯ãæ£èŠè¡šçŸã«ããæ€çŽ¢ã§ã¯ãããŸãã[ 1 ]ã
LinuxããŒãžã§ã³ã¯ãåã³ã³ãã€ã«ãããå®è¡å¯èœã¢ãžã¥ãŒã«ãšãŸã£ããåãã§ã¯ãªãããšãç¹°ãè¿ããŸãã[ 2 ]ã å®è¡å¯èœã¢ãžã¥ãŒã«ãšãœãããŠã§ã¢è£œåã®éã«ã®ã£ããããããŸãã é害ã®1ã€ã¯ãç¹å®ã®æ¡åŒµæ©èœãªã©ã®ãµããŒãã§ãã
ããã¯äœã§ããã第äžè ã¯å®å šã«ç解äžèœã§ãã ããããèŠããšãstrcmpïŒïŒé¢æ°ã®ããã°ã©ã åŒã³åºãã§ïŒ
cmpres = strcmp (newp->from_string, root->from_string);
ãããŠåœŒã¯ããã®è¡ãååŠçåŸã«ã©ã®ãããªææãæããã«ããã®ãããããŠã©ã®éæšæºã®æ¡åŒµæ©èœã䜿çšãããã®ãã«ã€ããŠãçã£ãŠããŸããã å ·äœçã«ã¯ããã®å Žåãæååã¯æ¬¡ã®ããã«ãªããŸãã
cmpres = __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (newp->from_string) && __builtin_constant_p (root->from_string) && (__s1_len = strlen (newp->from_string), __s2_len = strlen (root->from_string), (!((size_t)(const void *)((newp->from_string) + 1) - (size_t)(const void *)(newp->from_string) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((root->from_string) + 1) - (size_t)(const void *)(root->from_string) == 1) || __s2_len >= 4)) ? __builtin_strcmp (newp->from_string, root->from_string) : (__builtin_constant_p (newp->from_string) && ((size_t)(const void *)((newp->from_string) + 1) - (size_t)(const void *)(newp->from_string) == 1) && (__s1_len = strlen (newp->from_string), __s1_len < 4) ? (__builtin_constant_p (root->from_string) && ((size_t)(const void *)((root->from_string) + 1) - (size_t)(const void *)(root->from_string) == 1) ? __builtin_strcmp (newp->from_string, root->from_string) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (root->from_string); int __result = (((const unsigned char *) (const char *) (newp->from_string))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (newp->from_string))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (newp->from_string))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (newp->from_string))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (root->from_string) && ((size_t)(const void *)((root->from_string) + 1) - (size_t)(const void *)(root->from_string) == 1) && (__s2_len = strlen (root->from_string), __s2_len < 4) ? (__builtin_constant_p (newp->from_string) && ((size_t)(const void *)((newp->from_string) + 1) - (size_t)(const void *)(newp->from_string) == 1) ? __builtin_strcmp (newp->from_string, root->from_string) : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (newp->from_string); int __result = (((const unsigned char *) (const char *) (root->from_string))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (root->from_string))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (root->from_string))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (root->from_string))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (newp->from_string, root->from_string)))); });
ã¢ãã©ã€ã¶ãŒã¯ããã®ãããªã€ãã³ãã®é çªã«å¯Ÿå¿ããæºåãã§ããŠãããããã®ãããªæ§æã§ç¡æå³ãªèª€ã£ãã¡ãã»ãŒãžãçæããããšããããŸãã
ç°¡åãªäŸã§åœã®ã¡ãã»ãŒãžã«ã€ããŠèª¬æããŸãã 次ã®ã³ãŒãè¡ããããšããŸãã
assert(MAP_FAILED == (void *) -1);
assertïŒïŒãã¯ãã¯ã次ã®ã³ãŒãã«å±éãããŸãã
((((void *) -1) == (void *) -1) ? (void) (0) : __assert_fail ("((void *) -1) == (void *) -1", "loadmsgcat.c", 840, __PRETTY_FUNCTION__));
PVS-Studioã¢ãã©ã€ã¶ãŒã¯ãæ¯èŒã«é¢ããŠèª€ã£ãèŠåãçæããŸãïŒïŒïŒvoid *ïŒ-1ïŒ==ïŒvoid *ïŒ-1ïŒïŒ
V501 '=='æŒç®åã®å·Šå³ã«åãéšååŒããããŸãïŒïŒïŒvoid *ïŒ-1ïŒ==ïŒvoid *ïŒ-1 loadmsgcat.c 840
ããã«ã¯é©ããŸããã Visual C ++ã䜿çšããŠãã«ããããããã°ã©ã ã®éçºäžã«ãããããã¹ãŠãæ¢ã«å®è¡ããŸããã ãŸããããããçš®é¡ã®èå³æ·±ãçãããã®ããããããããŸãã äœãäœã§ããããåæè ã«ç解ãããããã«ãå€ãã®äœæ¥ãè¡ãå¿ èŠããããŸãã ç¡å®³ã§ãMAP_FAILEDãã¯ãããïŒvoid *ïŒ-1ãã§ããããšããã§ãã¯ããã ãã®ãã¢ãµãŒãããã¯ããæ±ã£ãŠããããšãç解ããããã«åœŒã«æããå¿ èŠããããŸãã ãããã¯ãã¹ãŠãVisual C ++ã§æ¢ã«è¡ãããŠããŸãã ããããLinuxã®å Žåã¯ãããŸããã
ãã®ãããªæ§é ã§æ£ããåäœããæ©èœã¯ãä»ã®ã³ã³ãã€ã©ããµããŒãããäœæ¥ã®å€§éšåãå ããŠããŸãã å€åŽã§ã¯ããã®äœåã¯èŠããŸããã ãã ããã³ã³ãã€ã©ãšæšæºã©ã€ãã©ãªã®æ©èœã調ã¹ãå¿ èŠããããŸãã ãããã®æ©èœã¯ã調æ»ããµããŒããããã³ãã¹ãããå¿ èŠããããŸãã
ããªããå°çãèŠãããšãã§ããããã«ãç§ã¯å°ããªã¯ãªãã¯ãéããããšãé¡ã£ãŠããŸãã å°æ¥ãéç解æããŒã«ã®éçºã®è€éãã瀺ãäžé£ã®èšäºãæžãäºå®ã§ãã é¢çœããšæããŸãã
çãããã³ãŒãã®æçãèŠã€ãããŸãã
glibcãããžã§ã¯ãã¯å€ãã®ããŒã«ã§ãã¹ããããŠããŸãããããã§ãé¢çœããã®ãèŠã€ããããšãã§ããŸããã ã³ãŒãã®ãããã®ã»ã¯ã·ã§ã³ãèŠãŠã¿ãŸãããã
å¥åŠãªè¡šçŸ
char *DCIGETTEXT (....) { .... /* Make CATEGORYVALUE point to the next element of the list. */ while (categoryvalue[0] != '\0' && categoryvalue[0] == ':') ++categoryvalue; .... }
V590ãã®è¡šçŸã調ã¹ãããšãæ€èšããŠãã ããã è¡šçŸãéå°ã§ãããã誀æ€ãå«ãŸããŠããŸãã dcigettext.c 582
æ¡ä»¶ã¯æ¬¡ã®ããã«ç°¡ç¥åã§ããŸãã
while (categoryvalue[0] == ':')
ããããããã¯ééãã§ã¯ãªããæ¡ä»¶ã®æåã®éšåïŒcategoryvalue [0]ïŒ= '\ 0'ïŒã¯åã«äžèŠã§ãã ãã ããçªç¶æ¬¡ã®ããã«èšè¿°ãããå¿ èŠããããŸãã
while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
æ€èšŒåã®ãã€ã³ã¿ãŒã®éåç §
å¿ ãããããã®å Žæã¯å±éºã§ãã ããããããã€ã³ã¿ãŒããŒãã«ãªãããšã¯ãããŸããã ããããããã§ãïŒ
static enum clnt_stat clntraw_call (h, proc, xargs, argsp, xresults, resultsp, timeout) CLIENT *h; u_long proc; xdrproc_t xargs; caddr_t argsp; xdrproc_t xresults; caddr_t resultsp; struct timeval timeout; { struct clntraw_private_s *clp = clntraw_private; XDR *xdrs = &clp->xdr_stream; .... if (clp == NULL) return RPC_FAILED; .... }
V595 nullptrã«å¯ŸããŠæ€èšŒãããåã«ããclpããã€ã³ã¿ãŒã䜿çšãããŸããã è¡ã確èªããŠãã ããïŒ145ã150ãclnt_raw.c 145
åæ§ã®æ¬ é¥ããã®ãã¡ã€ã«ã§æ¬¡ã«èŠãããŸãïŒV595 nullptrã«å¯ŸããŠæ€èšŒãããåã«ã 'clp'ãã€ã³ã¿ãŒãå©çšãããŸããã è¡ã確èªïŒ232ã235ãclnt_raw.c 232
å±éºãªã³ãŒãã®å¥ã®äŸïŒ
int __nss_getent_r (....) { .... if (res && __res_maybe_init (&_res, 0) == -1) { *h_errnop = NETDB_INTERNAL; *result = NULL; return errno; } .... if (status == NSS_STATUS_TRYAGAIN && (h_errnop == NULL || *h_errnop == NETDB_INTERNAL) && errno == ERANGE) }
V595 nullptrã«å¯ŸããŠæ€èšŒãããåã«ããh_errnopããã€ã³ã¿ãŒã䜿çšãããŸããã è¡ã確èªïŒ146ã172ãgetnssent_r.c 146
æ¡ä»¶ifïŒres && __res_maybe_initïŒïŒ_resã0ïŒ== -1ïŒãæºãããããšãé¢æ°ã¯ãšã©ãŒã«é¢ããæ å ±ãè¿ããŸãã ããããããšã§ããã€ã³ã¿ãŒãh_errnopããšãresultããéåç §ããŸãã ãã ãããããã®ãã€ã³ã¿ãŒã¯NULLã§ããå¯èœæ§ããããŸãã ãã®çµè«ã¯ã以äžã®ã³ãŒãã調ã¹ãããšã§åŒãåºãããšãã§ããŸãã
å±éºãªæé©åïŒè匱æ§ïŒ
char * __sha256_crypt_r (key, salt, buffer, buflen) const char *key; const char *salt; char *buffer; int buflen; { .... unsigned char temp_result[32] .... memset (temp_result, '\0', sizeof (temp_result)); .... .... // temp_result }
V597ã³ã³ãã€ã©ãŒã¯ããtemp_resultããããã¡ãŒã®ãã©ãã·ã¥ã«äœ¿çšããããmemsetãé¢æ°åŒã³åºããåé€ã§ããŸããã RtlSecureZeroMemoryïŒïŒé¢æ°ã䜿çšããŠããã©ã€ããŒãããŒã¿ãæ¶å»ããå¿ èŠããããŸãã sha256-crypt.c 385
ã³ã³ãã€ã©ã«ã¯ããªãªãŒã¹ããŒãžã§ã³ãã³ã³ãã€ã«ãããšãã«memsetïŒïŒé¢æ°åŒã³åºããåé€ããæš©å©ããããŸãã ããæ£ç¢ºã«ã¯ã圌ã¯æ³åŸäžã ãã§ãªããæé©åã®ããã«ãããè¡ã矩åããããŸãã ãããã¡ 'temp_result'ã¯ãmemsetïŒïŒé¢æ°ãåŒã³åºããåŸã¯ã©ãã§ã䜿çšãããªããããé¢æ°åŒã³åºãèªäœãäžèŠã§ãã
å人ããŒã¿ãæ¶å»ãããªããããè匱æ§ã«å¯ŸåŠããŠããŸãã memsetïŒïŒé¢æ°ã¯ãããé©åãªãã®ã«çœ®ãæããå¿ èŠããããŸãã ã¢ãã©ã€ã¶ãŒã¯RtlSecureZeroMemoryïŒïŒãæäŸããŸãããããã¯ãã¡ããLinuxã«ã¯ãããŸããã ããããé¡äŒŒç©ããããŸãã
åæ§ã®ç¶æ³ïŒV597ã³ã³ãã€ã©ãŒã¯ããtemp_resultããããã¡ãŒã®ãã©ãã·ã¥ã«äœ¿çšããããmemsetãé¢æ°åŒã³åºããåé€ã§ããŸãã RtlSecureZeroMemoryïŒïŒé¢æ°ã䜿çšããŠããã©ã€ããŒãããŒã¿ãæ¶å»ããå¿ èŠããããŸãã sha512-crypt.c 396
æªå®çŸ©ã®åäœ
glibcã©ã€ãã©ãªã¯ã§ããã ã移æ€æ§ã®é«ããã®ã«ãã¹ãã ãšæãããŸãã ãã ããæºåž¯æ§ã®èŠ³ç¹ããå®å šãšã¯èšããªãå€ãã®ããææ§é ããããŸãã
ã·ããã«é¢ããCæšæºã瀺ãããšã¯æ¬¡ã®ãšããã§ãã
æŽæ°ã®ããã¢ãŒã·ã§ã³ã¯ãåãªãã©ã³ãã§å®è¡ãããŸãã çµæã®åã¯ãææ Œãããå·Šãªãã©ã³ãã®åã§ãã å³ã®ãªãã©ã³ãã®å€ãè² ã§ããããææ Œããå·Šã®ãªãã©ã³ãã®å¹ 以äžã§ããå Žåãåäœã¯æªå®çŸ©ã§ãã
E1 << E2ã®çµæã¯ãE1ã®å·Šã·ããE2ãããäœçœ®ã§ãã 空ããããã¯ãŒãã§åããããŸãã E1ã«ç¬Šå·ãªãã®åãããå Žåãçµæã®å€ã¯E1 * 2 pow E2ã§ãçµæã®åã§è¡šçŸå¯èœãªæ倧å€ããã1ãæ³ãšããŠæžããããŸãã E1ã«ç¬Šå·ä»ãã®ã¿ã€ããšéè² ã®å€ããããE1 * 2 pow E2ãçµæã®ã¿ã€ãã§è¡šçŸã§ããå Žåããããçµæã®å€ã§ãã ãã以å€ã®å Žåãåäœã¯æªå®çŸ©ã§ãã
5 E1 >> E2ã®çµæã¯ãE1ãå³ã·ããããE2ãããäœçœ®ã§ãã E1ã«ç¬Šå·ãªãã®åãããå ŽåããŸãã¯E1ã«ç¬Šå·ä»ãã®åãšéè² ã®å€ãããå Žåãçµæã®å€ã¯E1 / 2 pow E2ã®åã®æŽæ°éšã«ãªããŸãã E1ã«ç¬Šå·ä»ãã¿ã€ããšè² ã®å€ãããå Žåãçµæã®å€ã¯å®è£ å®çŸ©ã§ãã
æšæºãããè² ã®æ°ãã·ããããã®ã¯ééã£ãŠãããšããããšã§ãã ãã ããããã¯glibcã©ã€ãã©ãªã§ã¯éåžžã«äžè¬çãªæäœã§ãã
å·Šã·ããã®äŸïŒ
static void init_cacheinfo (void) { .... count_mask = ~(-1 << (count_mask + 1)); .... }
V610æªå®çŸ©ã®åäœã ã·ããæŒç®å '<<ã確èªããŠãã ããã å·Šã®ãªãã©ã³ã '-1'ã¯è² ã§ãã cacheinfo.c 645
å³ã·ããã®äŸïŒ
utf8_encode (char *buf, int val) { .... *buf = (unsigned char) (~0xff >> step); .... }
åŒãã0xffãã®ã¿ã€ãã¯ãintãã§ã-256ã§ãã
以äžã¯ãäžæ£ç¢ºãªã·ããã芳å¯ã§ãããã¹ãŠã®å Žæã®ãªã¹ãã§ãã
- strxfrm_l.c 68
- clock_nanosleep.c 38
- ifaddrs.c 786
- xdr_intXX_t.c 35
- xdr_intXX_t.c 41
- private.h 327
- private.h 331
- zic.c 696
- zdump.c 212
- zdump.c 216
- timer_create.c 47
- timer_create.c 49
- loop.c 331
- loop.c 437
- mktime.c 207
- mktime.c 208
- mktime.c 211
- mktime.c 212
- mktime.c 230
- mktime.c 298
- mktime.c 298
- ld-collatââe.c 298
åæåãããŠããªãå€æ°ã䜿çšãã
static int send_vc(....) { .... int truncating, connreset, resplen, n; .... #ifdef _STRING_ARCH_unaligned *anssizp2 = orig_anssizp - resplen; *ansp2 = *ansp + resplen; #else .... } V614 Uninitialized variable 'resplen' used. res_send.c 790
誀ã£ãæååãã©ãŒããã
äžéšã®å Žæã§ã¯ã 'ïŒ u'ã䜿çšããŠçœ²åä»ãå€æ°ãåºåããŸãã äžéšã®å Žæã§ã¯ããïŒ dãã䜿çšããŠç¬Šå·ãªãå€æ°ãåºåããŸãã ãããã¯ãã¡ããäºçŽ°ãªããšã§ãããèšåãã䟡å€ããããŸãã
äŸïŒ
typedef unsigned int __uid_t; typedef __uid_t uid_t; int user2netname (...., const uid_t uid, ....) { .... sprintf (netname, "%s.%d@%s", OPSYS, uid, dfltdom); .... }
V576圢åŒãæ£ãããããŸããã 'sprintf'é¢æ°ã®4çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã æŽæ°åã®SIGNEDåŒæ°ãå¿ èŠã§ãã netname.c 51
ãã®ä»ã®é¢é£èšäºïŒ
- 'printf'é¢æ°ã®2çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã æŽæ°åã®SIGNEDåŒæ°ãå¿ èŠã§ãã locarchive.c 1741
- 'printf'é¢æ°ã®4çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã æŽæ°åã®SIGNEDåŒæ°ãå¿ èŠã§ãã locarchive.c 1741
- 'fprintf'é¢æ°ã®5çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã æŽæ°åã®SIGNEDåŒæ°ãå¿ èŠã§ãã res_debug.c 236
- 'sprintf'é¢æ°ã®3çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã UNSIGNEDæŽæ°åã®åŒæ°ãå¿ èŠã§ãã inet_net_ntop.c 134
- 'sprintf'é¢æ°ã®4çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã æŽæ°åã®SIGNEDåŒæ°ãå¿ èŠã§ãã ns_print.c 500
- 'sprintf'é¢æ°ã®5çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã æŽæ°åã®SIGNEDåŒæ°ãå¿ èŠã§ãã ns_print.c 500
- 'sprintf'é¢æ°ã®3çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã æŽæ°åã®SIGNEDåŒæ°ãå¿ èŠã§ãã ns_print.c 572
- 'sprintf'é¢æ°ã®4çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã æŽæ°åã®SIGNEDåŒæ°ãå¿ èŠã§ãã ns_print.c 572
- 'sprintf'é¢æ°ã®5çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã æŽæ°åã®SIGNEDåŒæ°ãå¿ èŠã§ãã ns_print.c 572
- 'sprintf'é¢æ°ã®3çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã UNSIGNEDæŽæ°åã®åŒæ°ãå¿ èŠã§ãã ns_print.c 628
- 'sprintf'é¢æ°ã®4çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã UNSIGNEDæŽæ°åã®åŒæ°ãå¿ èŠã§ãã ns_print.c 628
- 'sprintf'é¢æ°ã®5çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã UNSIGNEDæŽæ°åã®åŒæ°ãå¿ èŠã§ãã ns_print.c 628
- 'sprintf'é¢æ°ã®3çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã æŽæ°åã®SIGNEDåŒæ°ãå¿ èŠã§ãã ns_print.c 645
- 'sprintf'é¢æ°ã®3çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã UNSIGNEDæŽæ°åã®åŒæ°ãå¿ èŠã§ãã ns_print.c 685
- 'printf'é¢æ°ã®2çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã æŽæ°åã®SIGNEDåŒæ°ãå¿ èŠã§ãã nis_print.c 209
- 'printf'é¢æ°ã®2çªç®ã®å®åŒæ°ã確èªããããšãæ€èšããŠãã ããã æŽæ°åã®SIGNEDåŒæ°ãå¿ èŠã§ãã sprof.c 480
ãããã«
Linuxã®äžçããã®ã³ãŒãã®ãã§ãã¯ãéå§ããã®ã«è¯ããããžã§ã¯ãã¯éžã°ããŸããã§ããã 圌ã¯è³ªãé«ãããã :)ééãã«ã€ããŠèå³æ·±ãèšäºãæžãã®ã¯é£ããã§ãã ããããããã¯åé¡ã§ã¯ãããŸããã Linuxã®ä»ã®å€ãã®æåã§èå³æ·±ããããžã§ã¯ããåŸ ã£ãŠããŸããPVS-Studioã¢ãã©ã€ã¶ãŒã®æ©èœãå®èšŒããããã«ç¢ºèªããŸãã
ãµã€ããªã³ã¯
- ã¢ã³ãã¬ã€ã»ã«ã«ããã éçåæãšæ£èŠè¡šçŸ ã
- ããããªãŒã»ã«ãã§ã³ã³ã PVS-Studioããã³CppCatã®ãã¯ãã«ã«ãã£ã¬ã¯ã¿ãŒã§ããAndrei Karpovãšã®äŒè©± ã
質åãžã®åç
å€ãã®å Žåãèšäºã«ã¯åã質åãå¯ããããŸãã ããã§ãããã«å¯ŸããåçãåéããŸããïŒ PVS-Studioããã³CppCatããŒãžã§ã³2014ã«é¢ããèšäºã®èªè
ããã®è³ªåãžã®åç ã