Bug #261

ndrx_xa_base64_encode() gives incorrect base64 variant

Added by Oskars P 10 months ago. Updated 10 months ago.

Status:ClosedStart date:12/16/2017
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

For some reason ndrx_xa_base64_encode() gives strange base64 variant over the following data block:

N:NDRX:2:14623:7f27ec9c1880:000:20171217:013819046:ifiers.c:0699:TEST (nr bytes: 96)
  0000  00 00 59 5a 54 33 6f 52 41 46 59 5f 62 57 48 4e  ..YZT3oRAFY_bWHN
  0010  4f 46 54 70 6d 41 46 4e 75 64 69 6a 2b 6f 63 41  OFTpmAFNudij+ocA
  0020  45 42 41 44 49 41 00 00 30 f9 a2 d6 ff 7f 00 00  EBADIA..0.......
  0030  a8 2c 93 eb 01 00 01 00 32 00 01 00 00 00 00 00  .,......2.......
  0040  20 f9 a2 d6 ff 7f 00 00 31 2b 7e ec 27 7f 00 00   .......1+~.'...
  0050  00 00 00 00 00 00 00 00 f8 38 9c ec 01 00 00 00  .........8......

Result:

N:NDRX:5:14623:7f27ec9c1880:000:20171217:013819046:ifiers.c:0701:Got TPTRANID string: [AABZWlQzb1JBRllfYldITk9GVHBtQUZOdWRpaitvY0FFQkFESUEAADD5otb_fwAAqCyT6wEAAQAyAAEAAAAAACD5otb_fwAAMSt+7Cd_AAAAAAAAAAAAAPg4nOwBAAAA^A]

History

#1 Updated by Oskars P 10 months ago

$ ascii ^A
ASCII 0/1 is decimal 001, hex 01, octal 001, bits 00000001: called ^A, SOH

Thus it is not valid base64 symbol.

#2 Updated by Oskars P 10 months ago

  • Status changed from New to Closed

No changes needed. Added comments to code that ndrx_xa_base64_encode() does not install 0x00 terminating byte at the end.

Also available in: Atom PDF