Skip to content

CID 1508972: Uninitialized scalar variable #10206

Closed

Description

@maskit
331  if (ts_lua_hex_to_bin(key_bin, key, klen) == NULL) {
332    TSfree(key_bin);
333    return luaL_error(L, "hex to binary conversion failed");
334  }
335  key_bin_len = klen / 2;
336
337  HMAC(EVP_md5(), key_bin, key_bin_len, src, slen, sha_buf, &output_length);
338
   	
CID 1508972 (#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=34625651-13&modelId=34625651-0&fileInstanceId=162996654&filePath=%2Fplugins%2Flua%2Fts_lua_string.c&fileStart=23&fileEnd=33)]
339  ts_lua_hex_dump(hex_buf, sha_buf, sizeof(sha_buf));
340  lua_pushlstring(L, (char *)hex_buf, sizeof(hex_buf));
341
342  TSfree(key_bin);
343  return 1;
344}
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