Closed
Bug 895435
Opened 13 years ago
Closed 12 years ago
JS configure.in uses unquoted shell characters
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: sunfish, Assigned: sunfish)
Details
Attachments
(1 file)
|
1.16 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
Line 235 of js/src/configure.in is:
IS_ALPHA=`echo $MOZILLA_VERSION | grep [ab]`
The unquoted '[' and ']' work unless there happens to be a file named "b" in the current directory, in which case it expands to "grep b", which causes this line to fail. For example, in shell:
$ echo 25.0a1 | grep [ab]
25.0a1
$ echo hello > b
$ echo 25.0a1 | grep [ab]
$
This can by fixed by escaping or quoting the brackets. For example:
$ echo 25.0a1 | grep \[ab\]
25.0a1
$
That is, changing the line above to this:
IS_ALPHA=`echo $MOZILLA_VERSION | grep \[ab\]`
| Assignee | ||
Comment 1•12 years ago
|
||
This patch escapes the shell characters as described above.
Assignee: general → sunfish
Attachment #797336 -
Flags: review?(mh+mozilla)
Comment 2•12 years ago
|
||
Comment on attachment 797336 [details] [diff] [review]
configure-quote.patch
Review of attachment 797336 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/configure.in
@@ +231,5 @@
> changequote(,)
> MOZJS_MAJOR_VERSION=`echo $MOZILLA_VERSION | sed "s|\(^[0-9]*\)\.[0-9]*.*|\1|"`
> MOZJS_MINOR_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.\([0-9]*\).*|\1|"`
> MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"`
> +IS_ALPHA=`echo $MOZILLA_VERSION | grep \[ab\]`
might as well make it grep '[ab]'
Attachment #797336 -
Flags: review?(mh+mozilla) → review+
| Assignee | ||
Comment 3•12 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #2)
> > +IS_ALPHA=`echo $MOZILLA_VERSION | grep \[ab\]`
>
> might as well make it grep '[ab]'
Done. https://hg.mozilla.org/integration/mozilla-inbound/rev/419bd018c13e
Comment 4•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•