remove strcpy/sprintf
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12085 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		| @@ -40,8 +40,8 @@ FILE *headerfile, *codefile, *logfile; | |||||||
| #define STEM "asn1" | #define STEM "asn1" | ||||||
|  |  | ||||||
| static const char *orig_filename; | static const char *orig_filename; | ||||||
| static char header[1024]; | static char *header; | ||||||
| static char headerbase[1024] = STEM; | static char *headerbase = STEM; | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * list of all IMPORTs |  * list of all IMPORTs | ||||||
| @@ -75,8 +75,8 @@ init_generate (const char *filename, const char *base) | |||||||
| { | { | ||||||
|     orig_filename = filename; |     orig_filename = filename; | ||||||
|     if(base) |     if(base) | ||||||
| 	strcpy(headerbase, base); | 	asprintf(&headerbase, "%s", base); | ||||||
|     sprintf(header, "%s.h", headerbase); |     asprintf(&header, "%s.h", headerbase); | ||||||
|     headerfile = fopen (header, "w"); |     headerfile = fopen (header, "w"); | ||||||
|     if (headerfile == NULL) |     if (headerfile == NULL) | ||||||
| 	err (1, "open %s", header); | 	err (1, "open %s", header); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Love Hörnquist Åstrand
					Love Hörnquist Åstrand