Play safe with BString::LockBuffer...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27806 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
59967bf000
commit
2e631be55d
6
3rdparty/mmu_man/themes/BeThemeImporter.cpp
vendored
6
3rdparty/mmu_man/themes/BeThemeImporter.cpp
vendored
@ -111,7 +111,7 @@ status_t BeThemeImporter::ImportNextTheme(BMessage **theme)
|
||||
char *buff;
|
||||
buff = str.LockBuffer(1024);
|
||||
memset(buff, 0, 1024);
|
||||
file.Read(buff, 1024);
|
||||
file.Read(buff, 1024-1);
|
||||
if (err < B_OK)
|
||||
return err;
|
||||
str.UnlockBuffer();
|
||||
@ -125,7 +125,7 @@ status_t BeThemeImporter::ImportNextTheme(BMessage **theme)
|
||||
str = "";
|
||||
buff = str.LockBuffer(1024);
|
||||
memset(buff, 0, 1024);
|
||||
file.Read(buff, 1024);
|
||||
file.Read(buff, 1024-1);
|
||||
if (err < B_OK)
|
||||
return err;
|
||||
str.UnlockBuffer();
|
||||
@ -189,7 +189,7 @@ status_t BeThemeImporter::ImportNextTheme(BMessage **theme)
|
||||
return B_ERROR;
|
||||
buff = str.LockBuffer(1024);
|
||||
memset(buff, 0, 1024);
|
||||
file.Read(buff, 1024);
|
||||
file.Read(buff, 1024-1);
|
||||
if (err < B_OK)
|
||||
return err;
|
||||
str.UnlockBuffer();
|
||||
|
Loading…
Reference in New Issue
Block a user