Skip to content
Snippets Groups Projects
Commit 86c13e6a authored by Jan David Mol's avatar Jan David Mol
Browse files

bug 1362: strcpy -> strncpy

parent de5faae6
No related branches found
No related tags found
No related merge requests found
......@@ -658,7 +658,10 @@ class CepStorageCmd : public Command
virtual ~CepStorageCmd() { }
virtual void send();
virtual GCFEvent::TResult ack(GCFEvent& e);
void setStorageNode(char *storagenode) { strcpy(itsStorageNode,storagenode); }
void setStorageNode(char *storagenode) {
strncpy(itsStorageNode, storagenode, sizeof itsStorageNode);
itsStorageNode[sizeof itsStorageNode - 1] = 0;
}
private:
char itsStorageNode[10];
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment