if (!e) {
if (pos + 6 >= bufsize)
goto full;
- strcpy(buf + pos, "(null)");
+ strncpy(buf + pos, "(null)", 6);
return pos + 6;
}
switch (e->expression.vtype) {
case TYPE_VARIANT:
- strcpy(buf + pos, "(variant)");
+ strncpy(buf + pos, "(variant)", 9);
return pos + 9;
case TYPE_FIELD:
typelen = strlen(typestr);
if (pos + typelen >= bufsize)
goto full;
- strcpy(buf + pos, typestr);
+ strncpy(buf + pos, typestr, typelen);
return pos + typelen;
}
namelen = strlen(self->name);
name = (char*)mem_a(namelen + 16);
- strcpy(name, self->name);
+ strncpy(name, self->name, namelen);
array->ir_values = (ir_value**)mem_a(sizeof(array->ir_values[0]) * array->expression.count);
array->ir_values[0] = v;
namelen = strlen(self->name);
name = (char*)mem_a(namelen + 16);
- strcpy(name, self->name);
+ strncpy(name, self->name, namelen);
self->ir_values = (ir_value**)mem_a(sizeof(self->ir_values[0]) * self->expression.count);
self->ir_values[0] = v;
namelen = strlen(self->name);
name = (char*)mem_a(namelen + 16);
- strcpy(name, self->name);
+ strncpy(name, self->name, namelen);
self->ir_values[0] = v;
for (ai = 1; ai < self->expression.count; ++ai) {
/* This is outrageous! */
#define QCINT_ENTRY void*
#define QCINT_TO_HASH_ENTRY(q) ((void*)(uintptr_t)(q))
-#define HASH_ENTRY_TO_QCINT(h) ((qcint)(uintptr_t)(h))
+#define HASH_ENTRY_TO_QCINT(h) /*@only@*/ ((qcint) *((uintptr_t*)(&(h))) )
static ht code_string_cache;
static qcint code_string_cached_empty;
if (!dir)
return NULL;
- strcpy(dir->dd_name, name);
+ strncpy(dir->dd_name, name, strlen(name));
return dir;
}
if (*dir->dd_name) {
size_t n = strlen(dir->dd_name);
if ((dirname = (char*)mem_a(n + 5) /* 4 + 1 */)) {
- strcpy(dirname, dir->dd_name);
- strcpy(dirname + n, "\\*.*"); /* 4 + 1 */
+ strncpy(dirname, dir->dd_name, n);
+ strncpy(dirname + n, "\\*.*", 4); /* 4 + 1 */
}
} else {
if (!(dirname = util_strdup("\\*.*")))