Re: [PATCH] fix: added new BANNED_EXPL macro for better error messages, new parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"HG King via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

>  #undef strcpy
> -#define strcpy(x,y) BANNED(strcpy)
> +#define strcpy(x,y) BANNED_EXPL(strcpy, buffer_overflow_risk)

That does not help programmers that much (the above does not say
what to use instead, for example), and the mechanism inherently
does not give you sufficient space to give helpful guidance.

Adding a comment around each of these definition may be OK.  Upon
seeing foo_is_a_banned_function, somebody new to the codebase would
look for where it is banned, and find the above, so that is a good
place to give guidance.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux