By introducing this, if argument number will be wrong, the not matching
argument will be skipped.
I would prefer not to return error as I'm not sure
if platform will use it correctly.
Change-Id: I71544a50e7959e7a77718e221382ac400437eb95
{
/*BUNDLE_LOG_PRINT("\nit is not encoded");*/
int idx;
- for (idx = 1; idx < argc; idx = idx + 2) { /*start idx from one as argv[1] is user given argument*/
+ for (idx = 1; idx + 1 < argc; idx = idx + 2) { /*start idx from one as argv[1] is user given argument*/
bundle_add(b, argv[idx], argv[idx + 1]);
}
return b;
unsigned char *byte = NULL;
char *encoded_byte;
unsigned int byte_size;
- for(idx = 2; idx < argc; idx = idx+2) { // start idx from 2 as argv[1] is encoded
+ for(idx = 2; idx + 1 < argc; idx = idx+2) { // start idx from 2 as argv[1] is encoded
kv = NULL;
kva = NULL;