saray | longer mantained - 'Yet Another Rest API Stubber'.split | REST library
kandi X-RAY | saray Summary
kandi X-RAY | saray Summary
:warning: This project is no longer mantained. This is a simple API stubber for testing purposes.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of saray
saray Key Features
saray Examples and Code Snippets
Community Discussions
Trending Discussions on saray
QUESTION
i am trying to use struct to make some kind of list that takes the student's name, number etc. My problem when i try to build solution and see if there is an error, compiler(Visual Studio 2013) tells me to use "strcpy_s" intead of "strcpy". And when i fix it this time i get errors related to string string sizes. What exactly am i doing wrong?
...ANSWER
Answered 2017-Dec-25 at 20:29Well safe unsafe question is coming because of the buffer over run issue. strcpy
is not aware of destinations characeter holding capability. That's why its unsafe.
Safer would be strcpy_s( stud.name, 20, "goktug" );
. Here we are specifying that no matter what we should be in limit of 20 as destnation is capable of holding 20 characters including the NUL terminating character.
One can argue that here data is being truncated which is not better than a clear message that destination is too small to hold the copied thing, but surely better than a buffer overrun exploits. If we think along that line then well, we can reach the conclusion that we shouldn't call them unless we become sure that destination can hold the copied string.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install saray
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page