Questions tagged [coverity]

Coverity is a static code analysis tool for C, C++ and other programming languages.

Coverity is a static code analysis tool for C, C++ and other programming languages.

Synopsys offers a free online version of Coverity called Coverity Scan available for opensource projects.

322 questions
0
votes
2 answers

Project is not listed in coverity portal

I created one new project in coverity and I am able to commits defects in that project. When I open the coverity portal my project is not listed but it is listed in the configuration window.
Dhinesh
  • 105
  • 1
  • 2
  • 9
0
votes
1 answer

How to run batch file in coverity

I am new to coverity and i am using .bat file for building. Is there any way to build .bat file through coverity buil(cov-build) command in command line. thanks in advance.
Dhinesh
  • 105
  • 1
  • 2
  • 9
0
votes
3 answers

Resource leak due to delete operator

Here is the code that I have written: class sCircBuffer { public: sCircBuffer(void); ~sCircBuffer(void); double *Data; int Size; bool Init(int SizeBuffer); bool Delete(); } sCircBuffer ::…
chintan s
  • 6,170
  • 16
  • 53
  • 86
0
votes
2 answers

Coverity issue for deleting void pointer

Coverity has pointed out a bug about deleting void pointer. The code is as below: void *pbits=(void *)new…
chintan s
  • 6,170
  • 16
  • 53
  • 86
0
votes
1 answer

Error while compiling a C++ project with devenv using Coverity. (cov-build.exe)

When running a Coverity build I get the following error: Failed to locate msbuild.exe when handling devenv template configuration. Shutting down resident msbuild processes is impossible. Can't find it in Google! Does anyone know what this might…
borod108
  • 766
  • 1
  • 6
  • 16
-1
votes
1 answer

Limit coverity scan to main and dev, to stop covering feature branches

I am trying to setup yml for coverity scan in Devops only for main and dev and not other branches schedules: - cron: "0 3 * * 1-7" displayName: Daily late night coverity run branches: include: - main - dev always: true
Jcide
  • 141
  • 1
  • 5
-1
votes
1 answer

INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE findbugs

I am getting the error in my coverity. Suspicious integer expression (FB.INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE) defect: Bad comparison of nonnegative value with 0. Code where the issue raised int [][] intarray = DB Call; …
Gen
  • 2,400
  • 4
  • 24
  • 46
-1
votes
1 answer

Travis CI build failing coverity a coverity-related phase - Do I need a token?

I've recently forked a project on GitHub: notmyuser/proj to myuser/proj which is configured with both TravisCI, codecov and coverity. I commented out a part of the .travis.yml file, like so: #env: # global: # # coverity key # - secure:…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
-1
votes
1 answer

Coverity can't report infinite loop defect

I have following Java code with potential infinite loop if I pass in divisor with 0 value. But Coverity can't report this bug for me. class InfinityLoopExample { public int div(final int dividend, final int divisor) { int ret = 0; int x…
-1
votes
1 answer

I am using coverity to analyse node-ts template for a service. What should I use to build it?

Steps: Installed coverity Configured compiler cov-configure --javascript cov-configure --cs I am stuck at the build step of cov-build. Yarn is used to run and configure the service. But I am not sure what coverity wants here. I tried a couple of…
-1
votes
1 answer

Coverity -- Explicit null dereference

I have a scenario like this: int main() { int *p; int *q; bool cond1, cond2; // Does some processing and sets the cond1 and cond2 if (cond1) { p = // Assign valid address q = NULL; } else { p = NULL; q = // Assign…
Hemant Bhargava
  • 3,251
  • 4
  • 24
  • 45
-1
votes
1 answer

Coverity static analyzer reported issue can be ignored in Flex generated Scanner file or not

I am running Coverity static analyzer tool on My Project which is having some flex/bison generated cpp file. Coverity is reporting following warning on one of the flex file. CID 340350 (#1 of 1): Dereference before null check…
abhishekd
  • 133
  • 1
  • 5
-1
votes
1 answer

newly signed up observer in coverity scan open source project, curl scanned 23/JAN/2017, showing 0 defects

Newly signed up observer in coverity scan open source project, curl scanned 23/JAN/2017, showing 0 defects. I happen to know that is wrong answer. Do I need to setup, config, init, etc, 1st time using it?
-1
votes
3 answers

Coverity deflect: - String length miscalculation (BAD_ALLOC_STRLEN)

I have a coverity deflect to be fixed but I am not sure about it. I have a function (void my_function(a_type *my_variable)) with the following problematic line of code: body = malloc(strlen(&((my_type*) *my_variable)->Param2.body[1]) +1); where…
Bence Kaulics
  • 7,066
  • 7
  • 33
  • 63
-1
votes
2 answers

'Pointer to local outside scope' by static analyzis -- false positive?

I have got an issue flagged by Coverity that I cannot understand. I have an itializer: 1686 arrayOfNodeIds componentRefs = (arrayOfNodeIds) { 1687 .size = 2, 1688 .ids = (UA_NodeId[]) { UA_NODEID_NUMERIC(0, UA_NS0ID_HASCOMPONENT),…
Stasik
  • 2,568
  • 1
  • 25
  • 44
1 2 3
21
22