What I learned from my first C coding challenge
blog.jasonmooberry.com
What I learned from my first C coding challenge
1–10 of 85 posts
Re: What I learned from my first C coding challenge
#2Re: What I learned from my first C coding challenge
#3Depends also if there's pre validation (even with C you're never sure, so for example, reading that he used strcpy makes my head go "security hole", but this is a proof-of-concept so it's ok)
The best thing to keep in mind is that "There is no such thing as the fastest code"
Edit: strcmp to strcpy (or any str C function)
Re: What I learned from my first C coding challenge
#4Very interesting. The author at first seemed not that familiar with C, but in the end he got a good result Depends also if there's pre validation (even with C you're never sure, so for example, reading that he used strcpy makes my head go "security hole", but this is a proof-of-concept so it's ok) The best thing to keep in mind is that "There is no such thing as the fastest code" Edit: strcmp to strcpy (or any str C…
Re: What I learned from my first C coding challenge
#5Re: What I learned from my first C coding challenge
#6Very interesting. The author at first seemed not that familiar with C, but in the end he got a good result Depends also if there's pre validation (even with C you're never sure, so for example, reading that he used strcpy makes my head go "security hole", but this is a proof-of-concept so it's ok) The best thing to keep in mind is that "There is no such thing as the fastest code" Edit: strcmp to strcpy (or any str C…
Reading strcmp() makes you think "security hole"? Why?
Moral of the story, if you're going to use C strings, use the strn* variants.
Re: What I learned from my first C coding challenge
#7Very interesting. The author at first seemed not that familiar with C, but in the end he got a good result Depends also if there's pre validation (even with C you're never sure, so for example, reading that he used strcpy makes my head go "security hole", but this is a proof-of-concept so it's ok) The best thing to keep in mind is that "There is no such thing as the fastest code" Edit: strcmp to strcpy (or any str C…
Reading strcmp() makes you think "security hole"? Why?
Re: What I learned from my first C coding challenge
#8Very interesting. The author at first seemed not that familiar with C, but in the end he got a good result Depends also if there's pre validation (even with C you're never sure, so for example, reading that he used strcpy makes my head go "security hole", but this is a proof-of-concept so it's ok) The best thing to keep in mind is that "There is no such thing as the fastest code" Edit: strcmp to strcpy (or any str C…
Reading strcmp() makes you think "security hole"? Why?
Re: What I learned from my first C coding challenge
#9Re: What I learned from my first C coding challenge
#10Very interesting. The author at first seemed not that familiar with C, but in the end he got a good result Depends also if there's pre validation (even with C you're never sure, so for example, reading that he used strcpy makes my head go "security hole", but this is a proof-of-concept so it's ok) The best thing to keep in mind is that "There is no such thing as the fastest code" Edit: strcmp to strcpy (or any str C…
Reading strcmp() makes you think "security hole"? Why?
Point your string function to a non-null terminated byte buffer for example. At the very least you can crash the app
What's recommended (one of the recommendations) is to use the 'n' functions like strncmp that takes a maximum size.