Skip to content

Commit

Permalink
label.cc: limit size written to ProgVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz authored and franku committed Nov 5, 2019
1 parent 2db9df1 commit 73c0123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/stored/label.cc
Expand Up @@ -586,7 +586,7 @@ void CreateVolumeLabel(Device* dev, const char* VolName, const char* PoolName)
}
bstrncpy(dev->VolHdr.LabelProg, my_name, sizeof(dev->VolHdr.LabelProg));
snprintf(dev->VolHdr.ProgVersion, sizeof(dev->VolHdr.ProgVersion),
"Ver. %s %s", VERSION, BDATE);
"Ver. %.32s %.12s", VERSION, BDATE);
snprintf(dev->VolHdr.ProgDate, sizeof(dev->VolHdr.ProgDate), "Build %s %s",
__DATE__, __TIME__);
dev->SetLabeled(); /* set has Bareos label */
Expand Down

0 comments on commit 73c0123

Please sign in to comment.