How to avoid buffer overflow?

Answer Posted / nashiinformaticssolutions

Use bounds-checking functions like fgets() instead of unsafe functions like gets().

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I do serial ("comm") port I/O?

927


Can you write the function prototype, definition and mention the other requirements.

890


Write programs for String Reversal & Palindrome check

803


which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;

2890


What does return 1 means in c?

811


diff between exptected result and requirement?

1813


What are control structures? What are the different types?

852


How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?

797


What does typeof return in c?

839


What are linker error?

847


What does d mean?

790


Are enumerations really portable?

799


Why do we use & in c?

788


What is this infamous null pointer, anyway?

798


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

861