E_Launch_Screen *plscrn = NULL;
EINA_SAFETY_ON_NULL_GOTO(ee, error);
+ EINA_SAFETY_ON_NULL_GOTO(conf, error);
- if ((conf) && (conf->launch_file))
+ if (conf->launch_file)
{
- if(!edje_file_group_exists(conf->launch_file, "e/comp/effects/launch"))
- goto error;
- }
+ if (!edje_file_group_exists(conf->launch_file, "e/comp/effects/launch"))
+ goto error;
+ }
plscrn = E_NEW(E_Launch_Screen, 1);
EINA_SAFETY_ON_NULL_GOTO(plscrn, error);
E_Comp_Wl_Buffer *buffer;
struct wl_shm_buffer *shm_buffer;
int stride;
- void *pixels, *d;
+ void *pixels = NULL, *d;
output = wl_resource_get_user_data(output_resource);
buffer = e_comp_wl_buffer_get(buffer_resource, NULL);
if (!shm_buffer)
{
ERR("Could not get shm_buffer from resource");
+ free(pixels);
return;
}
if (!d)
{
ERR("Could not get buffer data");
+ free(pixels);
return;
}
len = strlen(path);
if (len < blen)
{
- strcpy(tmp, path);
- strcat(tmp, "/e-wl-keymap-XXXXXX");
+ strncpy(tmp, path, len);
+ strncat(tmp, "/e-wl-keymap-XXXXXX", 19);
}
else
return -1;
return;
}
- strcpy(e_comp_wl->xkb.area, tmp);
+ strncpy(e_comp_wl->xkb.area, e_comp_wl->xkb.size - 1);
free(tmp);
/* send updated keymap */
{
char temp[16];
snprintf(temp, sizeof(temp), "0x%x", e_client_util_win_get(child));
- strncat( transients, temp, sizeof(transients) - strlen(transients));
+ strncat(transients, temp, sizeof(transients) - strlen(transients));
}
}
char temp[32];
snprintf(temp, sizeof(temp), "[%d,%d,%d,%d] ", target_ec->shape_rects[i].x, target_ec->shape_rects[i].y,
target_ec->shape_rects[i].w, target_ec->shape_rects[i].h);
- strncat( shape_rects, temp, sizeof(shape_rects) - strlen(shape_rects));
+ strncat(shape_rects, temp, sizeof(shape_rects) - strlen(shape_rects));
}
}
char temp[32];
snprintf(temp, sizeof(temp), "[%d,%d,%d,%d] ", target_ec->shape_input_rects[i].x, target_ec->shape_input_rects[i].y,
target_ec->shape_input_rects[i].w, target_ec->shape_input_rects[i].h);
- strncat( shape_input, temp, sizeof(shape_input) - strlen(shape_input));
+ strncat(shape_input, temp, sizeof(shape_input) - strlen(shape_input));
}
}
if (rot_msg == E_INFO_ROTATION_MESSAGE_SET)
{
/* check if rval is valid */
- if ((rval < 0) || (rval > 270) || (rval % 90 != 0))
+ if ((rval > 270) || (rval % 90 != 0))
return reply;
}
return;
}
- strcpy(new_path, home_dir);
- strcat(new_path, path + 1);
+ strncpy(new_path, home_dir, len1);
+ strncat(new_path, path + 1, len1 + len2);
epd->dir = eina_stringshare_add(new_path);
free(new_path);
ep->default_dir_list = eina_list_append(ep->default_dir_list, epd);
return;
}
- strcpy(new_path, home_dir);
- strcat(new_path, path + 1);
+ strncpy(new_path, home_dir, len1);
+ strncat(new_path, path + 1, len1 + len2);
epd->dir = eina_stringshare_add(new_path);
free(new_path);
*(ep->user_dir_list) = eina_list_append(*(ep->user_dir_list), epd);
return;
}
- strcpy(new_path, home_dir);
- strcat(new_path, path + 1);
+ strncpy(new_path, home_dir, len1);
+ strncat(new_path, path + 1, len1 + len2);
epd->dir = eina_stringshare_add(new_path);
free(new_path);
*(ep->user_dir_list) = eina_list_prepend(*(ep->user_dir_list), epd);
len2 = strlen(path);
new_path = malloc(len1 + len2 + 1);
if (!new_path) return;
- strcpy(new_path, home_dir);
- strcat(new_path, path + 1);
+ strncpy(new_path, home_dir, len1);
+ strncat(new_path, path + 1, len1 + len2);
EINA_LIST_FOREACH(*(ep->user_dir_list), l, epd)
{
if (epd->dir)
else
pixmaps[type] = eina_hash_int32_new((Eina_Free_Cb)_e_pixmap_free);
cp = _e_pixmap_new(type);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(cp, NULL);
+
cp->win = xwin;
eina_hash_add(pixmaps[type], &xwin, cp);
#endif
}
cp = _e_pixmap_new(type);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(cp, NULL);
+
cp->win = id;
eina_hash_add(pixmaps[type], &id, cp);
uuid_generate(cp->uuid);
// and fall back to finding just the output name in the rel
// to identifier, rather than the specific screen id
name = alloca(strlen(id) + 1);
- strcpy(name, id);
+ strncpy(name, id, strlen(id));
if ((p = strchr(name, '/'))) *p = 0;
s = _screen_id_find(id);
if (!cs) return NULL;
name = alloca(strlen(cs->id) + 1);
- strcpy(name, cs->id);
+ strncpy(name, cs->id, strlen(cs->id));
if ((p = strchr(name, '/'))) *p = 0;
s = _screen_id_find(cs->id);
free(s);
continue;
}
- strcpy(s->id, s->info.name);
- strcat(s->id, "/");
+ strncpy(s->id, s->info.name, strlen(s->info.name));
+ strncat(s->id, "/", 1);
if (s->info.edid) strcat(s->id, s->info.edid);
printf("DRM RRR: Created Screen: %s\n", s->id);