Skip to content

Commit

Permalink
AP_Notify: minor fix for missed sprintf->snprintf convertion
Browse files Browse the repository at this point in the history
  • Loading branch information
dipspb committed Nov 4, 2016
1 parent 852d6b1 commit 5dcb104
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libraries/AP_Notify/AP_Notify.h
Expand Up @@ -116,10 +116,8 @@ class AP_Notify

bool buzzer_enabled() const { return _buzzer_enable; }

static void send_text( const char *str){

sprintf(_send_text, "%s", str) ;}
static char* get_text(){ return _send_text ;}
static void send_text(const char *str) { snprintf(_send_text, sizeof(_send_text), "%s", str); }
static char* get_text() { return _send_text; }

private:
static NotifyDevice* _devices[];
Expand Down

0 comments on commit 5dcb104

Please sign in to comment.