SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
28
audio/libworkman/patches/patch-cdrom_c
Normal file
28
audio/libworkman/patches/patch-cdrom_c
Normal file
|
@ -0,0 +1,28 @@
|
|||
Index: cdrom.c
|
||||
--- cdrom.c.orig
|
||||
+++ cdrom.c
|
||||
@@ -132,9 +132,9 @@ char *wm_drive_revision( void )
|
||||
|
||||
void wm_drive_settype( char *vendor, char *model, char *revision )
|
||||
{
|
||||
- sprintf( _wm_drive_vendor, "%s", vendor );
|
||||
- sprintf( _wm_drive_model, "%s", model );
|
||||
- sprintf( _wm_drive_revision, "%s", revision );
|
||||
+ strlcpy( _wm_drive_vendor, vendor, sizeof(_wm_drive_vendor) );
|
||||
+ strlcpy( _wm_drive_model, model, sizeof(_wm_drive_model) );
|
||||
+ strlcpy( _wm_drive_revision, revision, sizeof(_wm_drive_revision) );
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -154,9 +154,9 @@ find_drive_struct(char *vendor, char *model, char *rev
|
||||
continue;
|
||||
|
||||
if (d->proto->vendor[0] == '\0')
|
||||
- strcpy(d->proto->vendor, vendor);
|
||||
+ strlcpy(d->proto->vendor, vendor, sizeof(d->proto->vendor));
|
||||
if (d->proto->model[0] == '\0')
|
||||
- strcpy(d->proto->model, model);
|
||||
+ strlcpy(d->proto->model, model, sizeof(d->proto->model));
|
||||
|
||||
return (d->proto);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue