in the for-loop line 24, the condition is set to i < (i+m)
. If m
is a positive integer, than the condition will always be true, therefore s[i]
will at some point access memory that it shouldn’t.
More Related Contents:
- Is it possible to use notation [] with pointers in C?
- I’m getting an error when compiling my code. expected expression before ‘>=’ token [closed]
- Single function call to printf without using if statements? [closed]
- is my code wrong or is my computer slow?
- warning: suggest parentheses around assignment used as truth value [closed]
- arranging numbers in ascending order [closed]
- Alternative (K&R) C syntax for function declaration versus prototypes
- Why should we typedef a struct so often in C?
- Find most significant bit (left-most) that is set in a bit array
- How can I compare strings in C using a `switch` statement?
- In an OpenMP parallel code, would there be any benefit for memset to be run in parallel?
- Reading the whole text file into a char array in C
- bit shifting with unsigned long type produces wrong results
- Grabbing output from exec
- Tell gcc to specifically unroll a loop
- Writing binary number system in C code [duplicate]
- How do you implement a circular buffer in C?
- Linux: is there a read or recv from socket with timeout?
- Can I mix static and shared-object libraries when linking?
- How to call MATLAB code from C?
- Difference between scanf(“%c”, &c) and scanf(” %c”, &c) [duplicate]
- Is there a good reason for always enclosing a define in parentheses in C?
- What is the difference between getch() and getchar()?
- Read and write to binary files in C?
- Why does scanf() need & operator (address-of) in some cases, and not others? [duplicate]
- How to print the name of the symbols of ELF files like the nm?
- Array of structs replacing values over itself
- Decimal to Binary
- What is the default generator for CMake in Windows?
- Can you bind() and connect() both ends of a UDP connection