char temp[TDM_NAME_LEN];
tdm_error ret;
double stamp;
+ int n;
stamp = tdm_helper_get_time();
ret = func_output->output_get_capability(output_backend, caps);
}
/* FIXME: Use model for tdm client to distinguish amoung outputs */
- snprintf(temp, TDM_NAME_LEN, "%s-%d", caps->model, pipe);
+ n = snprintf(temp, sizeof(temp), "%s-%d", caps->model, pipe);
+ if ((size_t)n >= sizeof(temp)) {
+ temp[sizeof(temp) - 1] = '\0';
+ }
+
snprintf(caps->model, TDM_NAME_LEN, "%s", temp);
return TDM_ERROR_NONE;
tdm_private_layer *l = NULL;
char *p = bufs;
int *remain = &len;
+ int n;
pipe = private_output->pipe;
zpos = private_layer->caps.zpos;
TDM_SNPRINTF(p, remain, "_%p", l->showing_buffer->buffer);
}
- snprintf(fname, sizeof(fname), "tdm_%d_lyr_%d%s", pipe, zpos, bufs);
+ n = snprintf(fname, sizeof(fname), "tdm_%d_lyr_%d%s", pipe, zpos, bufs);
+ if ((size_t)n >= sizeof(fname)) {
+ fname[sizeof(fname) - 1] = '\0';
+ }
tbm_surface_internal_dump_buffer(buffer, fname);
TDM_DBG("%s dump excute", fname);