Since we have snprintf, why we don't have a snscanf?

前端 未结 6 1060
名媛妹妹
名媛妹妹 2020-12-14 10:16

I have snprintf and it can avoid a buffer overflow, but why there is no function called snscanf?

Code:

int main()
{
     ch         


        
6条回答
  •  隐瞒了意图╮
    2020-12-14 10:48

    How to use sscanf correctly and safely

    Note that fnprintf is not alone, and most array functions have a secure variation.

提交回复
热议问题