Bareos Bug Tracker
Bareos Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000881bareos-core[All Projects] directorpublic2017-12-06 20:362017-12-07 23:43
Reportercunio 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformLinuxOSDebianOS Version7
Product Version16.2.4 
Target VersionFixed in Version 
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.
bareos-master: impact
bareos-master: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action
Attached Files

- Relationships

-  Notes
(0002833)
joergs (administrator)
2017-12-07 12:21

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?
(0002835)
cunio (reporter)
2017-12-07 23:43

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

- 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


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker