Skip to content

CID 1508992: Uninitialized scalar variable #10200

Closed

Description

@maskit
441  if (ts_lua_hex_to_bin(key_bin, key, klen) == NULL) {
442    TSfree(key_bin);
443    return luaL_error(L, "hex to binary conversion failed");
444  }
445  key_bin_len = klen / 2;
446
447  HMAC(EVP_sha256(), key_bin, key_bin_len, src, slen, sha_buf, &output_length);
448
   	
CID 1508992 (#1 of 1): Uninitialized scalar variable (UNINIT)
9. uninit_use_in_call: Using uninitialized element of array sha_buf when calling ts_lua_hex_dump. [[show details](https://scan6.scan.coverity.com/eventId=34625582-13&modelId=34625582-0&fileInstanceId=162996654&filePath=%2Fplugins%2Flua%2Fts_lua_string.c&fileStart=23&fileEnd=33)]
449  ts_lua_hex_dump(hex_buf, sha_buf, sizeof(sha_buf));
450  lua_pushlstring(L, (char *)hex_buf, sizeof(hex_buf));
451
452  TSfree(key_bin);
453  return 1;
454}

Activity

  1. moved this to Todo in ATS v10.0.xon Aug 16, 2023
  2. moved this from Todo to Coverity Defects in ATS v10.0.xon Aug 22, 2023
  3. moved this from Coverity Defects to Done in ATS v10.0.xon Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions