Fix issues identified by static analyzer in BasicRandom.c and ExtendedRandom.c

Open Beginner friendly
#1,334 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
c

Research direction

Start in BasicRandom.c at lines 41, 85, and 133, then inspect ExtendedRandom.c at lines 41 and 179. Review how nearby C code validates pointers and handles ICC_GenerateRandomSeed status, then rerun the project’s static analysis; done means all listed findings are addressed without changing the intended random-generation behavior.

Written by the indexing model from the issue text.

Description

BasicRandom.c:
Input parameters such as bytes and seed are not validated for NULL. line 41, line 85
line 133: ICC_GenerateRandomSeed(ockCtx, &status, size, seedNative); - return value must be checked. if (status.majRC != ICC_OK)

ExtendedRandom.c: line 41: algName is not checked for being NULL.
Line 179: seed is not being checked for being NULL.

Dominant language
Java
Stars
16
Forks
24
Avg merge
3d 13h
Merged PRs (30d)
38

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from IBM/OpenJCEPlus

All issues in IBM/OpenJCEPlus

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.