if( *data_size                   >= UINT_MAX-l || *data_size + l               <= *used_size || (*data_size + l - *used_size) <= sizeof(buf)) return(XpmNoMemory);
WriteColors(dataptr, data_size, used_size, colors, ncolors, cpp)    char **dataptr;    unsigned int *data_size;    unsigned int *used_size;    XpmColor *colors;    unsigned int ncolors;    unsigned int cpp;{    char buf[BUFSIZ];    unsigned int a, key, l;    char *s, *s2;    char **defaults;    *buf = '"';    for (a = 0; a < ncolors; a++, colors++) {	defaults = (char **) colors;	s = buf + 1;	strncpy(s, *defaults++, cpp);	s += cpp;	for (key = 1; key <= NKEYS; key++, defaults++) {	    if ((s2 = *defaults)) {#ifndef VOID_SPRINTF		s +=#endif		sprintf(s, "\t%s %s", xpmColorKeys[key - 1], s2);#ifdef VOID_SPRINTF		s += strlen(s);#endif	    }	}	strcpy(s, "\",\n");	l = s + 3 - buf;	s = (char *) XpmRealloc(*dataptr, *data_size + l);	if (!s)	    return (XpmNoMemory);	*data_size += l;	strcpy(s + *used_size, buf);	*used_size += l;	*dataptr = s;    }    return (XpmSuccess);}