Commit 6adcc543 authored by Stewart Brodie's avatar Stewart Brodie
Browse files

Updated use of zap_gadget to avoid memory overwrite problem.

parent bc6480e4
......@@ -138,12 +138,13 @@ extern _kernel_oserror *create_object (_kernel_swi_regs *r, TaskDescriptor *t,in
if (dcs_template->message) {
zap_gadget(template,Button,Message_Gadget,value,dcs_template->message);
temp = 1+string_length(dcs_template->message);
} else {
/* len = maximum (len,template_length) */
temp = *(read_gadget(template,Button,Message_Gadget,max_value));
if (temp > len) len = temp;
}
if (temp > len) len = temp;
zap_gadget(template,Button,Message_Gadget,max_value,len);
if ((er=create_from_template(template, &new->window)) != NULL) goto error;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment