pb.type = PROP_STRING;
pb.data.p_string.str =
- xnew_atomic_array(Bufbyte, len);
- strncpy((char *)pb.data.p_string.str,
- (char *)pos, len);
+ xnew_atomic_array(Bufbyte, len+1);
+ xstrncpy((char *)pb.data.p_string.str,
+ (char *)pos, len+1);
pb.data.p_string.len = len;
Dynarr_add(prop, pb);
new_start =
generate_display_line(w, ddl, 0, ddl->bufpos + ddl->offset,
&prop, DESIRED_DISP);
+ (void)new_start; // Silence set-not-read warning.
+
ddl->offset = 0;
/* #### If there is propagated stuff the fail. We could
new_start =
generate_display_line(w, ddl, 0, ddl->bufpos + ddl->offset,
&prop, DESIRED_DISP);
+ (void)new_start; // Silence set-not-read warning.
+
ddl->offset = 0;
/* If there is propagated stuff then it is pretty much a