diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libcrypto/engine/enginetest.c | 13 | 
1 files changed, 5 insertions, 8 deletions
| diff --git a/src/regress/lib/libcrypto/engine/enginetest.c b/src/regress/lib/libcrypto/engine/enginetest.c index 5032dc47e7..7a0b1a8751 100644 --- a/src/regress/lib/libcrypto/engine/enginetest.c +++ b/src/regress/lib/libcrypto/engine/enginetest.c | |||
| @@ -95,8 +95,7 @@ static void display_engine_list(void) | |||
| 95 | int main(int argc, char *argv[]) | 95 | int main(int argc, char *argv[]) | 
| 96 | { | 96 | { | 
| 97 | ENGINE *block[512]; | 97 | ENGINE *block[512]; | 
| 98 | char buf[256]; | 98 | char *id, *name; | 
| 99 | const char *id, *name; | ||
| 100 | ENGINE *ptr; | 99 | ENGINE *ptr; | 
| 101 | int loop; | 100 | int loop; | 
| 102 | int to_return = 1; | 101 | int to_return = 1; | 
| @@ -207,13 +206,11 @@ int main(int argc, char *argv[]) | |||
| 207 | printf("About to beef up the engine-type list\n"); | 206 | printf("About to beef up the engine-type list\n"); | 
| 208 | for(loop = 0; loop < 512; loop++) | 207 | for(loop = 0; loop < 512; loop++) | 
| 209 | { | 208 | { | 
| 210 | sprintf(buf, "id%i", loop); | 209 | asprintf(&id, "id%i", loop); | 
| 211 | id = BUF_strdup(buf); | 210 | asprintf(&name, "Fake engine type %i", loop); | 
| 212 | sprintf(buf, "Fake engine type %i", loop); | ||
| 213 | name = BUF_strdup(buf); | ||
| 214 | if(((block[loop] = ENGINE_new()) == NULL) || | 211 | if(((block[loop] = ENGINE_new()) == NULL) || | 
| 215 | !ENGINE_set_id(block[loop], id) || | 212 | !id || !ENGINE_set_id(block[loop], id) || | 
| 216 | !ENGINE_set_name(block[loop], name)) | 213 | !name || !ENGINE_set_name(block[loop], name)) | 
| 217 | { | 214 | { | 
| 218 | printf("Couldn't create block of ENGINE structures.\n" | 215 | printf("Couldn't create block of ENGINE structures.\n" | 
| 219 | "I'll probably also core-dump now, damn.\n"); | 216 | "I'll probably also core-dump now, damn.\n"); | 
