@@ -152,6 +152,7 @@ char* mcrypsi_aes_128_gcm_encrypt(UDF_INIT* initid, UDF_ARGS* args, char* result
152
152
unsigned long * length , char * is_null , char * error ) {
153
153
unsigned char * dst = (unsigned char * ) initid -> ptr ;
154
154
int ret = 0 ;
155
+ * length = 0 ;
155
156
* is_null = 0 ;
156
157
* error = 0 ;
157
158
char * input_key = args -> args [0 ];
@@ -161,6 +162,7 @@ char* mcrypsi_aes_128_gcm_encrypt(UDF_INIT* initid, UDF_ARGS* args, char* result
161
162
int dst_size = 0 ;
162
163
ret = crypsi_aes_128_gcm_encrypt (input_key , input_text , text_size , & dst , & dst_size );
163
164
if (ret != 0 ) {
165
+ * is_null = 1 ;
164
166
* error = 1 ;
165
167
return NULL ;
166
168
}
@@ -197,6 +199,7 @@ char* mcrypsi_aes_128_gcm_decrypt(UDF_INIT* initid, UDF_ARGS* args, char* result
197
199
unsigned long * length , char * is_null , char * error ) {
198
200
unsigned char * dst = (unsigned char * ) initid -> ptr ;
199
201
int ret = 0 ;
202
+ * length = 0 ;
200
203
* is_null = 0 ;
201
204
* error = 0 ;
202
205
char * input_key = args -> args [0 ];
@@ -206,6 +209,7 @@ char* mcrypsi_aes_128_gcm_decrypt(UDF_INIT* initid, UDF_ARGS* args, char* result
206
209
int dst_size = 0 ;
207
210
ret = crypsi_aes_128_gcm_decrypt (input_key , input_text , text_size , & dst , & dst_size );
208
211
if (ret != 0 ) {
212
+ * is_null = 1 ;
209
213
* error = 1 ;
210
214
return NULL ;
211
215
}
@@ -242,6 +246,7 @@ char* mcrypsi_aes_192_gcm_encrypt(UDF_INIT* initid, UDF_ARGS* args, char* result
242
246
unsigned long * length , char * is_null , char * error ) {
243
247
unsigned char * dst = (unsigned char * ) initid -> ptr ;
244
248
int ret = 0 ;
249
+ * length = 0 ;
245
250
* is_null = 0 ;
246
251
* error = 0 ;
247
252
char * input_key = args -> args [0 ];
@@ -251,6 +256,7 @@ char* mcrypsi_aes_192_gcm_encrypt(UDF_INIT* initid, UDF_ARGS* args, char* result
251
256
int dst_size = 0 ;
252
257
ret = crypsi_aes_192_gcm_encrypt (input_key , input_text , text_size , & dst , & dst_size );
253
258
if (ret != 0 ) {
259
+ * is_null = 1 ;
254
260
* error = 1 ;
255
261
return NULL ;
256
262
}
@@ -287,6 +293,7 @@ char* mcrypsi_aes_192_gcm_decrypt(UDF_INIT* initid, UDF_ARGS* args, char* result
287
293
unsigned long * length , char * is_null , char * error ) {
288
294
unsigned char * dst = (unsigned char * ) initid -> ptr ;
289
295
int ret = 0 ;
296
+ * length = 0 ;
290
297
* is_null = 0 ;
291
298
* error = 0 ;
292
299
char * input_key = args -> args [0 ];
@@ -296,6 +303,7 @@ char* mcrypsi_aes_192_gcm_decrypt(UDF_INIT* initid, UDF_ARGS* args, char* result
296
303
int dst_size = 0 ;
297
304
ret = crypsi_aes_192_gcm_decrypt (input_key , input_text , text_size , & dst , & dst_size );
298
305
if (ret != 0 ) {
306
+ * is_null = 1 ;
299
307
* error = 1 ;
300
308
return NULL ;
301
309
}
@@ -332,6 +340,7 @@ char* mcrypsi_aes_256_gcm_encrypt(UDF_INIT* initid, UDF_ARGS* args, char* result
332
340
unsigned long * length , char * is_null , char * error ) {
333
341
unsigned char * dst = (unsigned char * ) initid -> ptr ;
334
342
int ret = 0 ;
343
+ * length = 0 ;
335
344
* is_null = 0 ;
336
345
* error = 0 ;
337
346
char * input_key = args -> args [0 ];
@@ -341,6 +350,7 @@ char* mcrypsi_aes_256_gcm_encrypt(UDF_INIT* initid, UDF_ARGS* args, char* result
341
350
int dst_size = 0 ;
342
351
ret = crypsi_aes_256_gcm_encrypt (input_key , input_text , text_size , & dst , & dst_size );
343
352
if (ret != 0 ) {
353
+ * is_null = 1 ;
344
354
* error = 1 ;
345
355
return NULL ;
346
356
}
@@ -377,6 +387,7 @@ char* mcrypsi_aes_256_gcm_decrypt(UDF_INIT* initid, UDF_ARGS* args, char* result
377
387
unsigned long * length , char * is_null , char * error ) {
378
388
unsigned char * dst = (unsigned char * ) initid -> ptr ;
379
389
int ret = 0 ;
390
+ * length = 0 ;
380
391
* is_null = 0 ;
381
392
* error = 0 ;
382
393
char * input_key = args -> args [0 ];
@@ -386,6 +397,7 @@ char* mcrypsi_aes_256_gcm_decrypt(UDF_INIT* initid, UDF_ARGS* args, char* result
386
397
int dst_size = 0 ;
387
398
ret = crypsi_aes_256_gcm_decrypt (input_key , input_text , text_size , & dst , & dst_size );
388
399
if (ret != 0 ) {
400
+ * is_null = 1 ;
389
401
* error = 1 ;
390
402
return NULL ;
391
403
}
@@ -422,6 +434,7 @@ char* mcrypsi_hmac_md5(UDF_INIT* initid, UDF_ARGS* args, char* result,
422
434
unsigned long * length , char * is_null , char * error ) {
423
435
unsigned char * dst = (unsigned char * ) initid -> ptr ;
424
436
int ret = 0 ;
437
+ * length = 0 ;
425
438
* is_null = 0 ;
426
439
* error = 0 ;
427
440
char * input_key = args -> args [0 ];
@@ -431,6 +444,7 @@ char* mcrypsi_hmac_md5(UDF_INIT* initid, UDF_ARGS* args, char* result,
431
444
int dst_size = 0 ;
432
445
ret = crypsi_hmac_md5 (input_key , input_text , text_size , & dst , & dst_size );
433
446
if (ret != 0 ) {
447
+ * is_null = 1 ;
434
448
* error = 1 ;
435
449
return NULL ;
436
450
}
@@ -467,6 +481,7 @@ char* mcrypsi_hmac_sha1(UDF_INIT* initid, UDF_ARGS* args, char* result,
467
481
unsigned long * length , char * is_null , char * error ) {
468
482
unsigned char * dst = (unsigned char * ) initid -> ptr ;
469
483
int ret = 0 ;
484
+ * length = 0 ;
470
485
* is_null = 0 ;
471
486
* error = 0 ;
472
487
char * input_key = args -> args [0 ];
@@ -476,6 +491,7 @@ char* mcrypsi_hmac_sha1(UDF_INIT* initid, UDF_ARGS* args, char* result,
476
491
int dst_size = 0 ;
477
492
ret = crypsi_hmac_sha1 (input_key , input_text , text_size , & dst , & dst_size );
478
493
if (ret != 0 ) {
494
+ * is_null = 1 ;
479
495
* error = 1 ;
480
496
return NULL ;
481
497
}
@@ -512,6 +528,7 @@ char* mcrypsi_hmac_sha256(UDF_INIT* initid, UDF_ARGS* args, char* result,
512
528
unsigned long * length , char * is_null , char * error ) {
513
529
unsigned char * dst = (unsigned char * ) initid -> ptr ;
514
530
int ret = 0 ;
531
+ * length = 0 ;
515
532
* is_null = 0 ;
516
533
* error = 0 ;
517
534
char * input_key = args -> args [0 ];
@@ -521,6 +538,7 @@ char* mcrypsi_hmac_sha256(UDF_INIT* initid, UDF_ARGS* args, char* result,
521
538
int dst_size = 0 ;
522
539
ret = crypsi_hmac_sha256 (input_key , input_text , text_size , & dst , & dst_size );
523
540
if (ret != 0 ) {
541
+ * is_null = 1 ;
524
542
* error = 1 ;
525
543
return NULL ;
526
544
}
@@ -557,6 +575,7 @@ char* mcrypsi_hmac_sha384(UDF_INIT* initid, UDF_ARGS* args, char* result,
557
575
unsigned long * length , char * is_null , char * error ) {
558
576
unsigned char * dst = (unsigned char * ) initid -> ptr ;
559
577
int ret = 0 ;
578
+ * length = 0 ;
560
579
* is_null = 0 ;
561
580
* error = 0 ;
562
581
char * input_key = args -> args [0 ];
@@ -566,6 +585,7 @@ char* mcrypsi_hmac_sha384(UDF_INIT* initid, UDF_ARGS* args, char* result,
566
585
int dst_size = 0 ;
567
586
ret = crypsi_hmac_sha384 (input_key , input_text , text_size , & dst , & dst_size );
568
587
if (ret != 0 ) {
588
+ * is_null = 1 ;
569
589
* error = 1 ;
570
590
return NULL ;
571
591
}
@@ -602,6 +622,7 @@ char* mcrypsi_hmac_sha512(UDF_INIT* initid, UDF_ARGS* args, char* result,
602
622
unsigned long * length , char * is_null , char * error ) {
603
623
unsigned char * dst = (unsigned char * ) initid -> ptr ;
604
624
int ret = 0 ;
625
+ * length = 0 ;
605
626
* is_null = 0 ;
606
627
* error = 0 ;
607
628
char * input_key = args -> args [0 ];
@@ -611,6 +632,7 @@ char* mcrypsi_hmac_sha512(UDF_INIT* initid, UDF_ARGS* args, char* result,
611
632
int dst_size = 0 ;
612
633
ret = crypsi_hmac_sha512 (input_key , input_text , text_size , & dst , & dst_size );
613
634
if (ret != 0 ) {
635
+ * is_null = 1 ;
614
636
* error = 1 ;
615
637
return NULL ;
616
638
}
0 commit comments