Browse Source

Added missing length checks

release/0.19
JustinAJ 10 years ago
parent
commit
c1c52692d1
  1. 6
      Jupiter/Functions.c

6
Jupiter/Functions.c

@ -703,7 +703,7 @@ double Jupiter_strtod_nospace(const char *str)
int strtoi_s(const char *str, size_t length, int base)
{
while (isspace(*str))
while (length != 0 && isspace(*str))
{
str++;
length--;
@ -713,7 +713,7 @@ int strtoi_s(const char *str, size_t length, int base)
unsigned int strtoui_s(const char *str, size_t length, int base)
{
while (isspace(*str))
while (length != 0 && isspace(*str))
{
str++;
length--;
@ -723,7 +723,7 @@ unsigned int strtoui_s(const char *str, size_t length, int base)
double Jupiter_strtod_s(const char *str, size_t length)
{
while (isspace(*str))
while (length != 0 && isspace(*str))
{
str++;
length--;

Loading…
Cancel
Save