[GRASS-dev] Fwd: New Defects reported by Coverity Scan for grass

2020-02-03 Thread Markus Neteler
Hi devs,

I have re-run the coverity scan on master, results below.

There is also the option of Travis integration which might be a good idea.
Anyone to support this?

Markus


-- Forwarded message -
From: 
Date: Mon, Feb 3, 2020 at 6:58 PM
Subject: New Defects reported by Coverity Scan for grass
To: 


Hi,

Please find the latest report on new defect(s) introduced to grass
found with Coverity Scan.

600 new defect(s) introduced to grass found with Coverity Scan.
1 defect(s), reported by Coverity Scan earlier, were marked fixed in
the recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 20 of 600 defect(s)


** CID 1415720:  Uninitialized variables  (UNINIT)
/raster/r.geomorphon/pattern.c: 128 in calc_pattern()



*** CID 1415720:  Uninitialized variables  (UNINIT)
/raster/r.geomorphon/pattern.c: 128 in calc_pattern()
122 pattern->negatives += i;
123
124 if (fabs(zenith_angle) > zenith_threshold ||
125 fabs(nadir_angle) > nadir_threshold) {
126 if (fabs(nadir_angle) < fabs(zenith_angle)) {
127 pattern->pattern[i] = 1;
>>> CID 1415720:  Uninitialized variables  (UNINIT)
>>> Using uninitialized value "zenith_height".
128 pattern->elevation[i] = zenith_height;  /* ZMIANA! */
129 pattern->distance[i] = zenith_distance;
130 pattern->num_positives++;
131 }
132 if (fabs(nadir_angle) > fabs(zenith_angle)) {
133 pattern->pattern[i] = -1;

** CID 1415719:  Resource leaks  (RESOURCE_LEAK)
/vector/v.info/level1.c: 29 in level_one_info()



*** CID 1415719:  Resource leaks  (RESOURCE_LEAK)
/vector/v.info/level1.c: 29 in level_one_info()
23 n_faces = n_kernels = 0;
24
25 Points = Vect_new_line_struct();
26 Cats = Vect_new_cats_struct();
27
28 Vect_rewind(Map);
>>> CID 1415719:  Resource leaks  (RESOURCE_LEAK)
>>> Failing to save or free storage allocated by "Vect_get_full_name(Map)" 
>>> leaks it.
29 G_message(_("Topology not available for vector map <%s>. "
30 "Registering primitives..."), Vect_get_full_name(Map));
31 while (TRUE) {
32  /* register line */
33  type = Vect_read_next_line(Map, Points, Cats);
34

** CID 1415718:  Resource leaks  (RESOURCE_LEAK)
/display/d.barscale/draw_scale.c: 637 in draw_scale()



*** CID 1415718:  Resource leaks  (RESOURCE_LEAK)
/display/d.barscale/draw_scale.c: 637 in draw_scale()
631 D_end();/* no-op? */
632 }
633 D_stroke();
634
635
636 if (fontsize < 0)
>>> CID 1415718:  Resource leaks  (RESOURCE_LEAK)
>>> Variable "label" going out of scope leaks the storage it points to.
637 return 0;
638
639 /* draw the distance + units text */
640
641 D_get_text_box(label, , , , );
642

** CID 1415717:  Resource leaks  (RESOURCE_LEAK)
/vector/v.overlay/area_area.c: 493 in area_area()



*** CID 1415717:  Resource leaks  (RESOURCE_LEAK)
/vector/v.overlay/area_area.c: 493 in area_area()
487 }
488
489 if (centr[0] || centr[1])
490 Vect_write_line(Out, GV_BOUNDARY, Points, Cats);
491 }
492
>>> CID 1415717:  Resource leaks  (RESOURCE_LEAK)
>>> Variable "APoints" going out of scope leaks the storage it points to.
493 return 0;

** CID 1415716:(STRING_OVERFLOW)
/raster/r.geomorphon/main.c: 504 in main()
/raster/r.geomorphon/main.c: 307 in main()



*** CID 1415716:(STRING_OVERFLOW)
/raster/r.geomorphon/main.c: 504 in main()
498 num_of_steps = 5;
499 multi_patterns = G_malloc(num_of_steps * sizeof(PATTERN));
500 /* prepare outputs */
501 for (i = 0; i < 5; ++i) {
502 multiple_output[i].forms_buffer =
Rast_allocate_buf(CELL_TYPE);
503 strcpy(multiple_output[i].name, prefix);
>>> CID 1415716:(STRING_OVERFLOW)
>>> You might overrun the 100-character fixed-size string 
>>> "multiple_output[i].name" by copying "postfixes[i]" without checking the 
>>> length.
504 strcat(multiple_output[i].name, postfixes[i]);
505 multiple_output[i].fd =
506 Rast_open_new(multiple_output[i].name, CELL_TYPE);
507 }
508
509 /* main loop */

[GRASS-dev] Workshop a FOSS4G 2020

2020-02-03 Thread Luca Delucchi
Hi everybody,

Is someone thinking to submit a workshop proposal for FOSS4G 2020?

-- 
ciao
Luca

www.lucadelu.org
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] r.slope.aspect with -n flag giving aspect of flat areas as -9998

2020-02-03 Thread Pedro Venâncio
Hi Markus and Anna,

It's fixed now! Thank you very much!

The #320  part will be fixed after
the merge.

-e and -n flags are now used also in QGIS Processing Framework:
qgis/QGIS#34087 

Best regards,

Pedro



Markus Metz  escreveu no dia sábado,
1/02/2020 à(s) 22:10:

>
>
> On Fri, Jan 31, 2020 at 9:35 PM Markus Neteler  wrote:
> >
> > On Fri, Jan 31, 2020 at 10:39 AM Pedro Venâncio
> >  wrote:
> > >
> > > Hi Anna and Markus,
> > >
> > > Thank you very much!
> > >
> > > A filled a ticket: https://github.com/OSGeo/grass/issues/319
> >
> > It was fixed in master f449ea5 and relbr78 fdd079c by Markus M.
> >
> > Please test and update/close the issue.
>
> there is a new PR #320 by Anna (https://github.com/OSGeo/grass/pull/320)
> fixing also the title and the color table. Please test!
>
> Markus M
>
> >
> > Best
> > markusN
>
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev