Changeset 5754:b23d79c13370 in roaraudio for libroar/pinentry.c


Ignore:
Timestamp:
11/16/12 16:49:56 (11 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

avoid getenv() and use more portable roar_env_get(). Also improved security as we enfore const now on bufferes obtained from the env.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/pinentry.c

    r5619 r5754  
    4545#endif 
    4646 
    47 int roar_pinentry_open (struct roar_pinentry * pe, int flags, char * display, char * tty, char * term) { 
     47int roar_pinentry_open (struct roar_pinentry * pe, int flags, const char * display, const char * tty, const char * term) { 
    4848#ifdef _CAN_OPERATE 
    4949 int in[2], out[2]; 
     
    5757 
    5858 if ( display == NULL ) 
    59   display = getenv("DISPLAY"); 
     59  display = roar_env_get("DISPLAY"); 
    6060 
    6161 if ( display == NULL ) 
     
    7373 
    7474 if ( term == NULL ) 
    75   term = getenv("TERM"); 
     75  term = roar_env_get("TERM"); 
    7676 
    7777 if ( term == NULL ) 
Note: See TracChangeset for help on using the changeset viewer.