return 0;
}
- strcpy(mykey,url+4);
+ strcpy(mykey,url+4); // will fit
mks = (struct mem_keyed_stream *) palacios_alloc(sizeof(struct mem_keyed_stream));
return 0;
}
- strcpy(mykey,key);
+ strcpy(mykey,key); // will fit
m = create_mem_stream();
return;
}
- strcpy(mykey,key);
+ strcpy(mykey,key); // will fit
m = create_mem_stream_internal(size);
return 0;
}
- strcpy(fks->path,url+5);
+ strcpy(fks->path,url+5); // will fit
fks->stype=STREAM_FILE;
ERROR("cannot allocate file keyed stream for key %s\n",key);
return 0;
}
+ // this sequence will fit and terminate with a zero
strcpy(path,fks->path);
strcat(path,"/");
strcat(path,key);
s->op->type = PALACIOS_KSTREAM_OPEN_KEY;
s->op->buf_len = len;
- strncpy(s->op->buf,key,len);
+ strncpy(s->op->buf,key,len); // will terminate buffer
// enter with it locked
if (do_request_to_response(s,&flags)) {