I created a function - primarily to remove quotes - that removes the first and last character from a string if the character sent to the function matches those first and last of the sent string. However, Since I end up incrementing a pointer I was wondering if I had sent the function an allocated array (say a "char String") and the first and last character are removed would trying to access element 99 cause a memory leak?
const char Outer
int Last_Index = strlen(String) - 1;
if(Last_Index < 0)
if(String != Outer || String[Last_Index] != Outer)
String[Last_Index] = '\0';
String++; /* May cause memory leak here */