mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-10 06:31:49 +00:00
Uses std::string
MD-20923
This commit is contained in:
parent
ac93a8b06f
commit
0ef971a251
1 changed files with 1 additions and 4 deletions
|
@ -31,8 +31,6 @@ UpdateDialogGtk* (*update_dialog_gtk_new)() = 0;
|
|||
#define BIND_FUNCTION(library,function) \
|
||||
function = reinterpret_cast<TYPEOF(function)>(dlsym(library,#function));
|
||||
|
||||
#define MAX_FILE_PATH 4096
|
||||
|
||||
bool extractFileFromBinary(int fd, const void* buffer, size_t length)
|
||||
{
|
||||
size_t count = write(fd,buffer,length);
|
||||
|
@ -42,8 +40,7 @@ bool extractFileFromBinary(int fd, const void* buffer, size_t length)
|
|||
|
||||
UpdateDialog* UpdateDialogGtkFactory::createDialog()
|
||||
{
|
||||
char* libPath = (char*)malloc(MAX_FILE_PATH);
|
||||
snprintf(libPath, MAX_FILE_PATH, "/tmp/mendeley-libUpdaterGtk.so.XXXXXX");
|
||||
char* libPath = strdup(std::string("/tmp/mendeley-libUpdaterGtk.so.XXXXXX").c_str());
|
||||
|
||||
int libFd = mkostemp(libPath, O_CREAT | O_WRONLY | O_TRUNC);
|
||||
if (libFd == -1)
|
||||
|
|
Loading…
Reference in a new issue