if (! id.named)
{
d->length = 4;
- d->data = (unsigned char *) reswr_alloc (4);
+ d->data = (unsigned char *) reswr_alloc (d->length);
put_16 (big_endian, 0xffff, d->data);
put_16 (big_endian, id.u.id, d->data + 2);
}
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 8;
- d->data = (unsigned char *) reswr_alloc (8);
+ d->data = (unsigned char *) reswr_alloc (d->length);
put_16 (big_endian,
a->flags | (a->next != NULL ? 0 : ACC_LAST),
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 4;
- d->data = (unsigned char *) reswr_alloc (4);
+ d->data = (unsigned char *) reswr_alloc (d->length);
put_16 (big_endian, c->xhotspot, d->data);
put_16 (big_endian, c->yhotspot, d->data + 2);
first = (struct bindata *) reswr_alloc (sizeof *first);
first->length = 6;
- first->data = (unsigned char *) reswr_alloc (6);
+ first->data = (unsigned char *) reswr_alloc (first->length);
put_16 (big_endian, 0, first->data);
put_16 (big_endian, 2, first->data + 2);
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 14;
- d->data = (unsigned char *) reswr_alloc (14);
+ d->data = (unsigned char *) reswr_alloc (d->length);
put_16 (big_endian, gc->width, d->data);
put_16 (big_endian, gc->height, d->data + 2);
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 2;
- d->data = (unsigned char *) reswr_alloc (2);
+ d->data = (unsigned char *) reswr_alloc (d->length);
length += 2;
first = (struct bindata *) reswr_alloc (sizeof *first);
first->length = 2;
- first->data = (unsigned char *) reswr_alloc (2);
+ first->data = (unsigned char *) reswr_alloc (first->length);
first->next = NULL;
pp = &first->next;
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 2;
- d->data = (unsigned char *) reswr_alloc (2);
+ d->data = (unsigned char *) reswr_alloc (d->length);
put_16 (big_endian, fd->index, d->data);
first = (struct bindata *) reswr_alloc (sizeof *first);
first->length = 6;
- first->data = (unsigned char *) reswr_alloc (6);
+ first->data = (unsigned char *) reswr_alloc (first->length);
put_16 (big_endian, 0, first->data);
put_16 (big_endian, 1, first->data + 2);
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 14;
- d->data = (unsigned char *) reswr_alloc (14);
+ d->data = (unsigned char *) reswr_alloc (d->length);
d->data[0] = gi->width;
d->data[1] = gi->height;
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 12;
- d->data = (unsigned char *) reswr_alloc (12);
+ d->data = (unsigned char *) reswr_alloc (d->length);
length += 12;
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 4;
- d->data = (unsigned char *) reswr_alloc (4);
+ d->data = (unsigned char *) reswr_alloc (d->length);
put_32 (big_endian, mi->help, d->data);
case RCDATA_WORD:
d->length = 2;
- d->data = (unsigned char *) reswr_alloc (2);
+ d->data = (unsigned char *) reswr_alloc (d->length);
put_16 (big_endian, ri->u.word, d->data);
break;
case RCDATA_DWORD:
d->length = 4;
- d->data = (unsigned char *) reswr_alloc (4);
+ d->data = (unsigned char *) reswr_alloc (d->length);
put_32 (big_endian, ri->u.dword, d->data);
break;
first = (struct bindata *) reswr_alloc (sizeof *first);
first->length = 6;
- first->data = (unsigned char *) reswr_alloc (6);
+ first->data = (unsigned char *) reswr_alloc (first->length);
length = 6;
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 52;
- d->data = (unsigned char *) reswr_alloc (52);
+ d->data = (unsigned char *) reswr_alloc (d->length);
length += 52;
vid = (struct bindata *) reswr_alloc (sizeof *vid);
vid->length = 6;
- vid->data = (unsigned char *) reswr_alloc (6);
+ vid->data = (unsigned char *) reswr_alloc (vid->length);
length += 6;
vilen = 6;
vsd = (struct bindata *) reswr_alloc (sizeof *vsd);
vsd->length = 6;
- vsd->data = (unsigned char *) reswr_alloc (6);
+ vsd->data = (unsigned char *) reswr_alloc (vsd->length);
length += 6;
vilen += 6;
vssd = (struct bindata *) reswr_alloc (sizeof *vssd);
vssd->length = 6;
- vssd->data = (unsigned char *) reswr_alloc (6);
+ vssd->data = (unsigned char *) reswr_alloc (vssd->length);
length += 6;
vilen += 6;
vvd = (struct bindata *) reswr_alloc (sizeof *vvd);
vvd->length = 6;
- vvd->data = (unsigned char *) reswr_alloc (6);
+ vvd->data = (unsigned char *) reswr_alloc (vvd->length);
length += 6;
vilen += 6;
vvsd = (struct bindata *) reswr_alloc (sizeof *vvsd);
vvsd->length = 4;
- vvsd->data = (unsigned char *) reswr_alloc (4);
+ vvsd->data = (unsigned char *) reswr_alloc (vvsd->length);
length += 4;
vilen += 4;