Anonymous | Login | Signup for a new account | 2024-03-29 01:30 UTC |
Main | My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000887 | Taste | [All Projects] ASN.1 Compiler v4 | public | 2019-11-06 20:24 | 2020-08-31 15:32 | ||||
Reporter | shd01 | ||||||||
Assigned To | gmamais | ||||||||
Priority | urgent | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Summary | 0000887: Encoding functions assume input buffers are initialised to zero | ||||||||
Description | The bitstream functions in asn1crt.c (e.g. BitStream_AppendByte) use a logical OR to write into the supplied bitstream buffer. If that buffer was previously used to encode a different message, the result is the logical OR of the two messages. This was an absolute bear to track down. Please fix it soon. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Notes | |
(0003663) gmamais (developer) 2019-11-07 07:50 |
Is it possible to call the BitStream_Init() function before starting the encoding process? |
(0003664) shd01 (reporter) 2019-11-07 08:31 |
Ah, I see. I can call the BitStream_Init(). |
(0003666) shd01 (reporter) 2019-11-07 08:49 |
But I don't think that zeroing during write is particularly inefficent. Every byte is already accessed at least once, so instead of doing: a) buf[i] = buf[i] | newbits you could do: b) buf[i] = (buf[i] & mask) | newbits I think you'd be hard-pressed to notice an efficiency difference between the two. |
(0003669) gmamais (developer) 2019-11-07 16:49 |
You are right. There should no actual difference between the two. It will be implemented the way you propose. |
(0003674) gmamais (developer) 2019-11-10 19:27 |
fixed in latest GitHub commit (version 4.2.0.7) |
Issue History | |||
Date Modified | Username | Field | Change |
2019-11-06 20:24 | shd01 | New Issue | |
2019-11-06 21:03 | maxime | Assigned To |
=> gmamais |
2019-11-06 21:03 | maxime | Status |
new => assigned |
2019-11-07 07:50 | gmamais | Note Added: 0003663 | |
2019-11-07 08:31 | shd01 | Note Added: 0003664 | |
2019-11-07 08:36 | shd01 | Note Added: 0003665 | |
2019-11-07 08:37 | shd01 | Note Deleted: 0003665 | |
2019-11-07 08:49 | shd01 | Note Added: 0003666 | |
2019-11-07 16:49 | gmamais | Note Added: 0003669 | |
2019-11-10 19:27 | gmamais | Note Added: 0003674 | |
2019-11-10 19:27 | gmamais | Status |
assigned => resolved |
2019-11-10 19:27 | gmamais | Resolution |
open => fixed |
2020-08-31 15:32 | maxime | Status |
resolved => closed |
Copyright © 2000 - 2011 MantisBT Group |