Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d.histogram: Fix Copy into buffer size issue #4795

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ShubhamDesai
Copy link
Contributor

This pull request fixes issue identified by Coverity Scan (CID : 1208334)
Used G_strlcpy() to fix this issue.

@github-actions github-actions bot added C Related code is in C module display labels Dec 3, 2024
Comment on lines +32 to +35
#include <grass/gis.h>
#include <grass/raster.h>
#include <grass/display.h>
#include <grass/glocale.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for nitpicking, please order these alphabetically.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know order of imports matter in C, since when not well isolated, different order gives different results. For my knowledge, are the headers in grass side-effect free with respect to different import order?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They should be, or else we'll find out... :-)

@nilason nilason added this to the 8.5.0 milestone Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C Related code is in C display module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants