Commit a425123
authored
Leave room in _DcmAttribute to NUL-terminate a 63-character keyword (#100)
"FrameOfReferenceToDisplayedCoordinateSystemTransformationMatrix" is 63
characters and we need room for the trailing NUL. While the compiler
would have added a trailing 0 byte anyway to maintain struct alignment,
reading the string would invoke undefined behavior.
Fixes a warning on GCC 15:
../src/dicom-dict-tables.c:3296:33: warning: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (64 chars into 63 available) [-Wunterminated-string-initialization]
3296 | {0X0070030B, DCM_VR_TAG_FD, "FrameOfReferenceToDisplayedCoordinateSystemTransformationMatrix"}1 parent de8c1bb commit a425123
2 files changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
0 commit comments