diff options
author | lloyd <[email protected]> | 2010-06-13 16:08:43 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-06-13 16:08:43 +0000 |
commit | a68fb6c85bfc35a6eb5b7ed3a60c44eea68d9413 (patch) | |
tree | 5ba72696c66d13b15aece6b91c98554f932aeb6a /src | |
parent | 271a9cea240fe437771ea776cd5fb4a087d833fe (diff) |
Use strncpy instead of strcpy in EGD reader
Diffstat (limited to 'src')
-rw-r--r-- | src/entropy/egd/es_egd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/entropy/egd/es_egd.cpp b/src/entropy/egd/es_egd.cpp index bd8dc8590..29880a544 100644 --- a/src/entropy/egd/es_egd.cpp +++ b/src/entropy/egd/es_egd.cpp @@ -46,7 +46,7 @@ int EGD_EntropySource::EGD_Socket::open_socket(const std::string& path) if(sizeof(addr.sun_path) < path.length() + 1) throw std::invalid_argument("EGD socket path is too long"); - std::strcpy(addr.sun_path, path.c_str()); + std::strncpy(addr.sun_path, path.c_str(), sizeof(addr.sun_path)); int len = sizeof(addr.sun_family) + std::strlen(addr.sun_path) + 1; |