View Issue Details

IDProjectCategoryView StatusLast Update
0000881bareos-coredirectorpublic2023-07-04 15:11
Reportercunio Assigned Tobruno-at-bareos  
Status closedResolutionwon't fix 
PlatformLinuxOSDebianOS Version7
Product Version16.2.4 
Summary0000881: B_DB::escape_object truncates output string
DescriptionIn B_DB::escape_object function in cats/cats.c file
bin_to_base64 is called with output buffer equal to encoded string but this function uses last byte for string termination
Returned encoded string is truncated by one character.
It produces truncated RestoreObject in database
It breaks restore job with percona plugin
TagsNo tags attached.




2017-12-07 12:21

developer   ~0002833

I've a quick look at the code, but didn't find an error. Can you give us more information? What database backend to you use?


2017-12-07 23:43

reporter   ~0002835

I use sqlite (builtin)
restore_object has size 141 bytes which gives 188 after base64
Only 187 bytes is stored in database
Look at line 137 in lib/base64.c buflen is 188 from
B_DB::db_escape_object in cats/cats.c
After this line is 187 but result needs 188


2023-07-04 15:11

manager   ~0005125

sqlite is no more used in recent version of code.

Issue History

Date Modified Username Field Change
2017-12-06 20:36 cunio New Issue
2017-12-07 12:21 joergs Note Added: 0002833
2017-12-07 12:21 joergs Status new => feedback
2017-12-07 23:43 cunio Note Added: 0002835
2017-12-07 23:43 cunio Status feedback => new
2023-07-04 15:11 bruno-at-bareos Assigned To => bruno-at-bareos
2023-07-04 15:11 bruno-at-bareos Status new => closed
2023-07-04 15:11 bruno-at-bareos Resolution open => won't fix
2023-07-04 15:11 bruno-at-bareos Note Added: 0005125