mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 02:52:50 +08:00
initializing memory before copying to the buffer for getExeDir()
This commit is contained in:
@@ -30,8 +30,9 @@ namespace alpr
|
||||
return directory;
|
||||
#else
|
||||
char buffer[2048];
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
|
||||
readlink("/proc/self/exe", buffer, 2048);
|
||||
readlink("/proc/self/exe", buffer, sizeof(buffer));
|
||||
|
||||
std::stringstream ss;
|
||||
ss << buffer;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#ifndef OPENALPR_PLATFORM_H
|
||||
#define OPENALPR_PLATFORM_H
|
||||
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <sstream>
|
||||
|
||||
#ifdef WINDOWS
|
||||
|
Reference in New Issue
Block a user