Skip to content

Commit

Permalink
Fix #19 - memory unitialized
Browse files Browse the repository at this point in the history
Former-commit-id: 53a7653
  • Loading branch information
Jean-Romain committed May 17, 2018
1 parent 61f733f commit 7d7dd7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inst/include/lasdefinitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ class LASheader : public LASquantizer, public LASattributer
{
number_of_variable_length_records = 1;
offset_to_point_data += 54;
vlrs = (LASvlr*)malloc(sizeof(LASvlr)*number_of_variable_length_records);
vlrs = (LASvlr*)calloc(1,sizeof(LASvlr)*number_of_variable_length_records);
}
vlrs[i].reserved = 0; // used to be 0xAABB
strncpy(vlrs[i].user_id, user_id, 16);
Expand Down

0 comments on commit 7d7dd7f

Please sign in to comment.